16-Feb-2023 04:18
Hello fellow F5ers,
does anyone know a way to change the crypto master key on an LTM with ansible?
The TMSH command is:
modify sys crypto master-key prompt-for-password
the command is interactive and requires the user to repeat the passwort input two times.
Is it even possible to do this by using an ansible module?
Thanks for any advise
--
Ichnafi
Solved! Go to Solution.
09-Mar-2023 02:20
I finally got it to run, but the ansible module documentation is really lacking good examples.
Solution see here: https://community.f5.com/t5/technical-forum/ansible-running-bash-commands-with-bigip-command-module-...
20-Feb-2023 03:10 - edited 20-Feb-2023 03:11
Have you tried making a bash script and using echo or the Linux yes to supply the data to the interactive prompt ?
https://www.howtogeek.com/415535/how-to-use-the-yes-command-on-linux/
You can trigger the script with the ansible command module for F5 and bash -c "<trigger script in Lunux>" from within the TMSH.
https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigip_command_module.html
20-Feb-2023 10:38
Also I found an article how to make F5 to not ask you for confirmation 🙂
20-Feb-2023 23:57
Hi @Nikoolayy1 ,
thank you for your hint. I will have a look. I usually try not to use the bigip_command_module or bigip_cli_module, because of idempotency.
09-Mar-2023 02:20
I finally got it to run, but the ansible module documentation is really lacking good examples.
Solution see here: https://community.f5.com/t5/technical-forum/ansible-running-bash-commands-with-bigip-command-module-...
10-Mar-2023 12:57
Hey @Ichnafi - I'm sharing your feedback around needing better examples with colleagues in F5, who may reach out to you via direct message here on DevCentral for more detail. Thanks for bringing it up.