Forum Discussion
Change crypto master key with ansible not possible?
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
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-how-it-s/td-p/311582
- IchnafiCirrostratus
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.
- IchnafiCirrostratus
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-how-it-s/td-p/311582
- Leslie_HubertusRet. Employee
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.
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
Also I found an article how to make F5 to not ask you for confirmation 🙂
https://support.f5.com/csp/article/K58523903
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com