Forum Discussion

cwkim_261931's avatar
cwkim_261931
Icon for Nimbostratus rankNimbostratus
Apr 16, 2019

Ansible "bigip_virtual_server" How do I config "mask" in my virtual server?

Hi

 

I try to make playbook to create virtual server.

 

But, I have trouble.... 3 Points.

 

1) I cannot found mask module in "bigip_virtual_server"..... Where is it?!

 

2) I have to create fastL4 profile... But, It was not create.... Why is it happen?

 

3) I have to set enabled transparent option... but, I cannot config this option in my monitor.

 

Plz Help me.

 

5 Replies

  • 1 - No mask option in

    bigip_virtual_server
    instead think you need to use the bitmask under the
    destination
    option e.g.
    destination: 10.3.4.128/25

    2 - What version of Ansible are you running, as the module

    bigip_profile_fastl4
    will only be available in version 2.8 once released? If you want to use the F5 modules from 2.8 you look at downloading and using the following ansible galaxy role: Ansible Galaxy f5devcentral.f5ansible

    3 - The

    transparent
    option has not been added into the monitor modules. I would look at using the
    bigip_command
    module (bigip_command – Run arbitrary command on F5 devices) to run the retentive TMSH command to modify or create the monitor with the correct options.

    You could also look at adding an issue on the F5 Ansible github repo (GitHub - F5Networks/f5-ansible issues) and it might get fixed for the next release.

  • jitu's avatar
    jitu
    Icon for Nimbostratus rankNimbostratus

    These are depends on Ansible version. All modules are not available below Ansible version 2.7

     

    please run the command ansible --version and paste the output. You can use the mask as suggested by McGrath

     

    • jitu's avatar
      jitu
      Icon for Nimbostratus rankNimbostratus

      I have tested with ansible 2.7.9 however the mask in destination is not accepted

       

      TASK [Add nodes to pool] *********************************************************************************************************************************************** changed: [192.168.0.105 -> localhost] => (item={u'host': u'10.10.10.60', u'name': u'web_server5'}) changed: [192.168.0.105 -> localhost] => (item={u'host': u'10.10.10.70', u'name': u'web_server7'})

       

      TASK [Create VIP] ****************************************************************************************************************************************************** fatal: [192.168.0.105 -> localhost]: FAILED! => {"changed": false, "msg": "The provided destination is not a valid IP address"} to retry, use: --limit @/etc/ansible/

       

      PLAY RECAP ************************************************************************************************************************************************************* 192.168.0.105 : ok=5 changed=4 unreachable=0 failed=1

       

      root@ansible:/etc/ansible ansible --version ansible 2.7.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]

       

  • These are depends on Ansible version. All modules are not available below Ansible version 2.7

     

    please run the command ansible --version and paste the output. You can use the mask as suggested by McGrath

     

    • jitu_106210's avatar
      jitu_106210
      Icon for Nimbostratus rankNimbostratus

      I have tested with ansible 2.7.9 however the mask in destination is not accepted

       

      TASK [Add nodes to pool] *********************************************************************************************************************************************** changed: [192.168.0.105 -> localhost] => (item={u'host': u'10.10.10.60', u'name': u'web_server5'}) changed: [192.168.0.105 -> localhost] => (item={u'host': u'10.10.10.70', u'name': u'web_server7'})

       

      TASK [Create VIP] ****************************************************************************************************************************************************** fatal: [192.168.0.105 -> localhost]: FAILED! => {"changed": false, "msg": "The provided destination is not a valid IP address"} to retry, use: --limit @/etc/ansible/

       

      PLAY RECAP ************************************************************************************************************************************************************* 192.168.0.105 : ok=5 changed=4 unreachable=0 failed=1

       

      root@ansible:/etc/ansible ansible --version ansible 2.7.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]