Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo command #96

Merged
merged 3 commits into from
May 15, 2023
Merged

Echo command #96

merged 3 commits into from
May 15, 2023

Conversation

umputun
Copy link
Owner

@umputun umputun commented May 15, 2023

This is a new command, echo. The only goal is to print something to the normal (i.e. non- verbose and non-debug) log. This command is a little bit redundant; currently, it is possible to do just echo in a script and see the output in -v mode. However, there are use cases where such output is an essential result from the playbook execution, for example, if the playbook made a new resource, like an instance or volume and we need to inform the user what is ip/id of the new resource. For cases like this, I don't want to hide this info behind -v flag.

The echo command is echo and it is the lowest priority match, i.e. all the existing command will match first before we try to recognize echo. In the playbook, this command is as simple as this:

- name: show things
   echo: something blah $foo $bar

the command is not just printing things directly, it actually runs sh -c echo .... on the target (or local) host.

@umputun umputun merged commit adc8338 into master May 15, 2023
4 checks passed
@umputun umputun deleted the echo_command branch May 15, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant