Forum Discussion

Ankur_Mathur's avatar
Ankur_Mathur
Icon for Nimbostratus rankNimbostratus
Mar 25, 2019

[Ansible] How to create the hostname of a guest while creation in Host

While creating a new guest using bigip_vcmp_guest module, there is a provision to specify the "name" of the guest but not the "hostname". On creating the guest, the .localdomain gets appended to the hostname of the guest. How can we change this hostname of the guest on the Host?

 

I tried the bigip_hostname but this updates the hostname on the guest, however the hostname on the host remains the same.

 

1 Reply

  • Hello Ankur,

     

    I don't believe you can use the bigip_vcmp_guest module to make edits to the hostname.

     

    It is interesting that bigip_hostname did not work though. You could instead try bigip_command or maybe bigip_config as a work-around.

     

    If you're willing to move away from automation, F5 has this documentation on changing the guest of the hostname after it has already been created. Their recommendation is basically to manually change the bigip_conf file and load from a new ucs.

     

    Best of luck,

     

    Austin