Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Change crypto master key with ansible not possible?

Ichnafi
Cirrostratus
Cirrostratus

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

1 ACCEPTED SOLUTION

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-...

 

View solution in original post

5 REPLIES 5

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

Ichnafi
Cirrostratus
Cirrostratus

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.

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-...

 

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.