Skip to content

Commit

Permalink
discover: generate config with --silent flag (#44604)
Browse files Browse the repository at this point in the history
When you add a node through the discover flow, we use the
teleport node configure command to generate a configuration file,
and then we actually start Teleport.

By default, the configure command prints some hint messages telling
the user to run teleport start, but this is not necessary in the discover
flow since we start it up for you.

The --silent command was added to solve this, but we never went back
and updated the install script to use it.

Closes #29518
  • Loading branch information
zmb3 authored Jul 24, 2024
1 parent 10a2b00 commit b83af7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/web/scripts/node-join/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ EOF
install_teleport_node_config() {
log "Writing Teleport node service config to ${TELEPORT_CONFIG_PATH}"
${TELEPORT_BINARY_DIR}/teleport node configure \
--silent \
--token ${JOIN_TOKEN} \
${JOIN_METHOD_FLAG} \
--ca-pin ${CA_PINS} \
Expand Down
2 changes: 1 addition & 1 deletion tool/teleport/common/teleport.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ func onConfigDump(flags dumpFlags) error {
fmt.Fprintf(flags.stdout, "- The Teleport configuration is located at %q.\n", configPath)
}
if !canWriteToDataDir {
fmt.Fprintf(flags.stdout, "- Teleport will be storing data at %q. To change that, run \"teleport configure\" with the \"--data-dir\" flag.\n", flags.DataDir)
fmt.Fprintf(flags.stdout, "- Teleport will be storing data at %q. To change that, edit the \"data_dir\" field in %q.", flags.DataDir, configPath)
}
fmt.Fprintf(flags.stdout, "\n")
} else {
Expand Down

0 comments on commit b83af7d

Please sign in to comment.