F5Networks / f5-ansible

Imperative Ansible modules for F5 BIG-IP products
GNU General Public License v3.0
376 stars 229 forks source link

Playbook is failing while trying to create a multizone application (Using latest Collections) #2195

Closed ghost closed 1 year ago

ghost commented 2 years ago
COMPONENT NAME

bigip_pool

Environment

VENV with Collections

ANSIBLE VERSION
ansible [core 2.12.4]
  config file = /home/ansible/venv/20220328-xyz/playbooks/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/venv/20220328-xyz/lib/python3.9/site-packages/ansible

  ansible collection location = /home/ansible/venv/20220328-xyz/playbooks/collections
  executable location = /home/ansible/venv/20220328-xyz/bin/ansible
  python version = 3.9.12 (main, Mar 24 2022, 16:21:12) [GCC 7.5.0]
  jinja version = 3.1.1
  libyaml = True
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     15.1.2.1
  Build       0.100.10
  Edition     Engineering Hotfix
  Date        Thu Feb 18 06:01:32 PST 2021

Hotfix List
ID803237-2    ID910653-5  ID914293-3  ID913829-4  ID942185-2  ID888341-7
ID756812-3
CONFIGURATION
[defaults]
collections_paths = ./collections
OS / ENVIRONMENT
Ubuntu 18
SUMMARY

I am running a playbook to create multizone application. Purpose of this application is to create a combination of VIP/Pools and WIP. Here are the components related to the Playbook. https://github.com/focrensh/f5-ansible_multi-zone This playbook fails at this task. TASK [Create LTM Pool] //////////////////////////////////\\\\\\\\\\\\\\\\ Error Output "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 107, in \n _ansiballz_main()\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 48, in invoke_module\n run_name='main', alter_sys=True)\n File \"/usr/lib/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 1261, in \n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 1254, in main\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 827, in exec_module\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 134, in send_teem\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 70, in send\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 45, in prepare_request\n File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 92, in build_telemetry\nTypeError: split() takes no keyword arguments\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } \\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////////////////

STEPS TO REPRODUCE
Playbooks being used.
https://github.com/focrensh/f5-ansible_multi-zone

ansible-playbook -i hosts create_app.yaml -e "@app_templates/App1.yaml" -vvvv

In addition to the playbook listed at this URL, the latest version of the collections have been installed and the playbook has been modified as following. 

---
- name: Create LTM/GTM Config
  hosts: localhost
  gather_facts: false
  connection: local

  collections:                       #<------ added this
  - f5networks.f5_modules #<------ added this

  tasks:
    - include_tasks: ltm_tasks.yaml
      loop: "{{ app_locations }}"
      loop_control:
        loop_var: loc

    - include_tasks: gtm_tasks.yaml

Furthermore, app_templates/App1.yaml has been updated to reflect new app config.
EXPECTED RESULTS

Running playbook will produce 2 VIPs and a WIP along with its related components.

ACTUAL RESULTS
(20220328-xyz) ansible@DESKTOP-OMEQDCT:~/venv/20220328-xyz/playbooks$ ansible-playbook -i hosts create_app.yaml -e "@app_templates/App1.yaml" -vvvv
ansible-playbook [core 2.12.4]
  config file = /home/ansible/venv/20220328-xyz/playbooks/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/venv/20220328-xyz/lib/python3.9/site-packages/ansible
  ansible collection location = /home/ansible/venv/20220328-xyz/playbooks/collections
  executable location = /home/ansible/venv/20220328-xyz/bin/ansible-playbook
  python version = 3.9.12 (main, Mar 24 2022, 16:21:12) [GCC 7.5.0]
  jinja version = 3.1.1
  libyaml = True
Using /home/ansible/venv/20220328-xyz/playbooks/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/ansible/venv/20220328-xyz/playbooks/hosts as it did not pass its verify_file() method
script declined parsing /home/ansible/venv/20220328-xyz/playbooks/hosts as it did not pass its verify_file() method
auto declined parsing /home/ansible/venv/20220328-xyz/playbooks/hosts as it did not pass its verify_file() method
Set default localhost to localhost
Parsed /home/ansible/venv/20220328-xyz/playbooks/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /home/ansible/venv/20220328-xyz/lib/python3.9/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: create_app.yaml **********************************************************************************************
Positional arguments: create_app.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/home/ansible/venv/20220328-xyz/playbooks/hosts',)
extra_vars: ('@/home/ansible/venv/20220328-xyz/playbooks/app_templates/App1.yaml',)
forks: 5
1 plays in create_app.yaml

PLAY [Create LTM/GTM Config] *******************************************************************************************
Loading collection f5networks.f5_modules from /home/ansible/venv/20220328-xyz/playbooks/collections/ansible_collections/f5networks/f5_modules
META: ran handlers

TASK [include_tasks] ***************************************************************************************************
task path: /home/ansible/venv/20220328-xyz/playbooks/create_app.yaml:12
included: /home/ansible/venv/20220328-xyz/playbooks/ltm_tasks.yaml for localhost => (item={'datacenter_name': 'Zone1', 'vip_address': '10.1.10.101:80', 'pool_members': [{'pm': '10.1.20.101:8001', 'pr': 10}, {'pm': '10.1.20.102:8002', 'pr': 7}]})
included: /home/ansible/venv/20220328-xyz/playbooks/ltm_tasks.yaml for localhost => (item={'datacenter_name': 'Zone2', 'vip_address': '10.1.110.101:80', 'pool_members': [{'pm': '10.1.120.101:8001', 'pr': 10}, {'pm': '10.1.120.102:8002', 'pr': 7}]})

TASK [Create LTM Pool] *************************************************************************************************
task path: /home/ansible/venv/20220328-xyz/playbooks/ltm_tasks.yaml:1
<localhost> Using network group action bigip for bigip_pool
Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/playbooks/collections/ansible_collections/ansible/netcommon
<localhost> connection transport is rest
<localhost> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<localhost> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: ansible
<localhost> EXEC /bin/sh -c 'echo ~ansible && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540 `" && echo ansible-tmp-1648593748.7796683-17358-219517451221540="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540 `" ) && sleep 0'
Using module file /home/ansible/venv/20220328-xyz/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py
<localhost> PUT /home/ansible/.ansible/tmp/ansible-local-17351juuo8owx/tmpl9r7vz49 TO /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/ /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py", line 107, in <module>
    _ansiballz_main()
  File "/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py", line 48, in invoke_module
    run_name='__main__', alter_sys=True)
  File "/usr/lib/python2.7/runpy.py", line 188, in run_module
    fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py", line 1261, in <module>
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py", line 1254, in main
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py", line 827, in exec_module
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py", line 134, in send_teem
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py", line 70, in send
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py", line 45, in prepare_request
  File "/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py", line 92, in build_telemetry
TypeError: split() takes no keyword arguments
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1648593748.7796683-17358-219517451221540/AnsiballZ_bigip_pool.py\", line 48, in invoke_module\n    run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python2.7/runpy.py\", line 188, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 1261, in <module>\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 1254, in main\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py\", line 827, in exec_module\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 134, in send_teem\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 70, in send\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 45, in prepare_request\n  File \"/tmp/ansible_bigip_pool_payload_RNka3z/ansible_bigip_pool_payload.zip/ansible_collections/f5networks/f5_modules/plugins/module_utils/teem.py\", line 92, in build_telemetry\nTypeError: split() takes no keyword arguments\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
ghost commented 2 years ago

Here is the config for app_templates/App1.yaml.

app_name: xyzapp1 gslb_domain: gslb.xyz.com app_locations:

trinaths commented 2 years ago

@tashafan - We dont support Py27. Please upgrade to Py36 and verify again.

wojtek0806 commented 2 years ago

@tashafan the error you are seeing is coming from env that has 2.7 python installed, quite likely you forgot to put delegate_to: localhost in the task and its trying to execute it not on your controller (which seems to have 3.x python installed)

ghost commented 2 years ago

@wojtek0806 Few things to untangle here.

  1. The venv environment is utilizing Python3.9. Here is the initial playbook which is calling out to other playbooks. Connection is set to local. Python 2.7.5 is running on the bigip device. Let me know if I am missing something here.

[root@bigip-dc1:Active:Standalone] config # python --version Python 2.7.5

Listed below is the initial playbook being called. '''

As contrast. I am have another environment running legacy python version. Which is able to execute most of the same playbook without adding any additional information. I created the venv with Python3 to meet the requirements of the issue.

Listed below is the ansible version. There are no differences between the earlier config and this one other than that "attempt2" is not utilizing collections and is using an older version of Python and Ansible.. ''' Projects/20220328-xyz/attempt2$ ansible --version ansible 2.9.27 config file = /home/ansible/Projects/20220328-PremiereInc/attempt2/ansible.cfg configured module search path = [u'/home/ansible/.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.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]


Here is the playbook output for comparison.

'''
ansible@DESKTOP-OMEQDCT:~/Projects/20220328-PremiereInc/attempt2$ ansible-playbook -i hosts create_app.yaml -e "@app_templates/App1.yaml"

PLAY [Create LTM/GTM Config] *********************************************************************
TASK [include_tasks] *****************************************************************************included: /home/ansible/Projects/20220328-xyz/attempt2/ltm_tasks.yaml for localhost
included: /home/ansible/Projects/20220328-PremiereInc/attempt2/ltm_tasks.yaml for localhost       

TASK [Create LTM Pool] ***************************************************************************ok: [localhost]

TASK [Create LTM Pool Members] *******************************************************************ok: [localhost] => (item={u'pr': 10, u'pm': u'10.1.20.101:8001'})
ok: [localhost] => (item={u'pr': 7, u'pm': u'10.1.20.102:8002'})

TASK [Create LTM iRule] **************************************************************************ok: [localhost]

TASK [Create LTM Virtual] ************************************************************************ok: [localhost]

TASK [Create LTM Pool] ***************************************************************************ok: [localhost]

TASK [Create LTM Pool Members] *******************************************************************ok: [localhost] => (item={u'pr': 10, u'pm': u'10.1.120.101:8001'})
ok: [localhost] => (item={u'pr': 7, u'pm': u'10.1.120.102:8002'})

TASK [Create LTM iRule] **************************************************************************ok: [localhost]

TASK [Create LTM Virtual] ************************************************************************ok: [localhost]

TASK [include_tasks] *****************************************************************************included: /home/ansible/Projects/20220328-PremiereInc/attempt2/gtm_tasks.yaml for localhost

TASK [Create GTM Virtual Server] *****************************************************************failed: [localhost] (item={u'datacenter_name': u'Zone1', u'pool_members': [{u'pr': 10, u'pm': u'10.1.20.101:8001'}, {u'pr': 7, u'pm': u'10.1.20.102:8002'}], u'vip_address': u'10.1.10.101:80'}) => 
{"ansible_loop_var": "item", "changed": false, "item": {"datacenter_name": "Zone1", "pool_members": [{"pm": "10.1.20.101:8001", "pr": 10}, {"pm": "10.1.20.102:8002", "pr": 7}], "vip_address": "10.1.10.101:80"}, "msg": "Public URI path not registered: /tm/gtm/server/?Common?Zone1/virtual-servers/"}
failed: [localhost] (item={u'datacenter_name': u'Zone2', u'pool_members': [{u'pr': 10, u'pm': u'10.1.120.101:8001'}, {u'pr': 7, u'pm': u'10.1.120.102:8002'}], u'vip_address': u'10.1.110.101:80'}) 
=> {"ansible_loop_var": "item", "changed": false, "item": {"datacenter_name": "Zone2", "pool_members": [{"pm": "10.1.120.101:8001", "pr": 10}, {"pm": "10.1.120.102:8002", "pr": 7}], "vip_address": "10.1.110.101:80"}, "msg": "Public URI path not registered: /tm/gtm/server/?Common?Zone2/virtual-servers/"}

PLAY RECAP ***************************************************************************************localhost                  : ok=11   changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
ghost commented 2 years ago

@wojtek0806 It appears that updating the hosts file with the venv path helped. This is what was added to the hosts file localhost ansible_python_interpreter=/home/ansible/venv/20220328-xyz/bin/python

ghost commented 2 years ago

@wojtek0806 They playbook is able to create VIP, Pool, PoolMembers and attach an irule sccessfully. It is tailing while trying to create GTM related tasks. Here is the error.

''' TASK [Create GTM Virtual Server] ***failed: [localhost] (item={'datacenter_name': 'Zone1', 'vip_address': '10.1.10.101:80', 'pool_members': [{'pm': '10.1.20.101:8001', 'pr': 10}, {'pm': '10.1.20.102:8002', 'pr': 7}]}) => {"ansible_loop_var": "item", "changed": false, "item": {"datacenter_name": "Zone1", "pool_members": [{"pm": "10.1.20.101:8001", "pr": 10}, {"pm": "10.1.20.102:8002", "pr": 7}], "vip_address": "10.1.10.101:80"}, "msg": "b'{\"code\":404,\"message\":\"Public URI path not registered: /tm/gtm/server/?Common?Zone1/virtual-servers/\",\"referer\":\"10.1.1.169\",\"restOperationId\":9465621,\"kind\":\":resterrorresponse\"}'"} failed: [localhost] (item={'datacenter_name': 'Zone2', 'vip_address': '10.1.110.101:80', 'pool_members': [{'pm': '10.1.120.101:8001', 'pr': 10}, {'pm': '10.1.120.102:8002', 'pr': 7}]}) => {"ansible_loop_var": "item", "changed": false, "item": {"datacenter_name": "Zone2", "pool_members": [{"pm": "10.1.120.101:8001", "pr": 10}, {"pm": "10.1.120.102:8002", "pr": 7}], "vip_address": "10.1.110.101:80"}, "msg": "b'{\"code\":404,\"message\":\"Public URI path not registered: /tm/gtm/server/?Common?Zone2/virtual-servers/\",\"referer\":\"10.1.1.169\",\"restOperationId\":9465805,\"kind\":\":resterrorresponse\"}'"}

Also, here is the overall output with the -vvvv

''' (20220328-xyz) ansible@DESKTOP-OMEQDCT:~/venv/20220328-xyz/attempt2/playbooks$ ansible-playbook -i hosts create_app.yaml -e "@app_templates/App1.yaml" -vvvv ansible-playbook [core 2.12.4] config file = /home/ansible/venv/20220328-xyz/attempt2/playbooks/ansible.cfg configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/ansible/venv/20220328-xyz/lib/python3.9/site-packages/ansible ansible collection location = /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections executable location = /home/ansible/venv/20220328-xyz/bin/ansible-playbook python version = 3.9.12 (main, Mar 24 2022, 16:21:12) [GCC 7.5.0] jinja version = 3.1.1 libyaml = True Using /home/ansible/venv/20220328-xyz/attempt2/playbooks/ansible.cfg as config file
setting up inventory plugins host_list declined parsing /home/ansible/venv/20220328-xyz/attempt2/playbooks/hosts as it did not pass its verify_file() method script declined parsing /home/ansible/venv/20220328-xyz/attempt2/playbooks/hosts as it did not pass its verify_file() method auto declined parsing /home/ansible/venv/20220328-xyz/attempt2/playbooks/hosts as it did not pass its verify_file() method Set default localhost to localhost Parsed /home/ansible/venv/20220328-xyz/attempt2/playbooks/hosts inventory source with ini plugin Loading callback plugin default of type stdout, v2.0 from /home/ansible/venv/20220328-xyz/lib/python3.9/site-packages/ansible/plugins/callback/default.py Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: create_app.yaml **Positional arguments: create_app.yaml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/home/ansible/venv/20220328-xyz/attempt2/playbooks/hosts',) extra_vars: ('@/home/ansible/venv/20220328-xyz/attempt2/playbooks/app_templates/App1.yaml',) forks: 5 1 plays in create_app.yaml

PLAY [Create LTM/GTM Config] ***Loading collection f5networks.f5_modules from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules META: ran handlers

TASK [include_tasks] ***task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/create_app.yaml:13
included: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml for localhost => (item={'datacenter_name': 'Zone1', 'vip_address': '10.1.10.101:80', 'pool_members': [{'pm': '10.1.20.101:8001', 'pr': 10}, {'pm': '10.1.20.102:8002', 'pr': 7}]}) included: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml for localhost => (item={'datacenter_name': 'Zone2', 'vip_address': '10.1.110.101:80', 'pool_members': [{'pm': '10.1.120.101:8001', 'pr': 10}, {'pm': '10.1.120.102:8002', 'pr': 7}]})

TASK [Create LTM Pool] *****task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:1

Using network group action bigip for bigip_pool Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065 `" && echo ansible-tmp-1648665493.862641-8427-55509983210065="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmp5hpnqeee TO /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065/AnsiballZ_bigip_pool.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065/ /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065/AnsiballZ_bigip_pool.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065/AnsiballZ_bigip_pool.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665493.862641-8427-55509983210065/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "aggregate": null, "description": null, "lb_method": "round-robin", "metadata": null, "monitor_type": null, "monitors": [ "http" ], "name": "xyzapp1-Zone1", "partition": "Common", "priority_group_activation": 1, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "quorum": null, "replace_all_with": false, "reselect_tries": null, "service_down_action": "reset", "slow_ramp_time": null, "state": "present" } }, "partition": "Common" } TASK [Create LTM Pool Members] *****************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:11 Using network group action bigip for bigip_pool_member Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280 `" && echo ansible-tmp-1648665497.965343-8453-120147170477280="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool_member.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmpp1pfu788 TO /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280/AnsiballZ_bigip_pool_member.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280/ /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665497.965343-8453-120147170477280/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => (item={'pm': '10.1.20.101:8001', 'pr': 10}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.20.101", "aggregate": null, "availability_requirements": null, "connection_limit": null, "description": null, "fqdn": null, "fqdn_auto_populate": null, "ip_encapsulation": null, "monitors": null, "name": null, "partition": "Common", "pool": "xyzapp1-Zone1", "port": 8001, "preserve_node": null, "priority_group": 10, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "ratio": null, "replace_all_with": false, "reuse_nodes": true, "state": "present" } }, "item": { "pm": "10.1.20.101:8001", "pr": 10 }, "monitors": [], "state": "disabled" } Using network group action bigip for bigip_pool_member connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087 `" && echo ansible-tmp-1648665501.8505247-8453-151374669324087="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool_member.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmphvjl75qb TO /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087/AnsiballZ_bigip_pool_member.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087/ /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665501.8505247-8453-151374669324087/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => (item={'pm': '10.1.20.102:8002', 'pr': 7}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.20.102", "aggregate": null, "availability_requirements": null, "connection_limit": null, "description": null, "fqdn": null, "fqdn_auto_populate": null, "ip_encapsulation": null, "monitors": null, "name": null, "partition": "Common", "pool": "xyzapp1-Zone1", "port": 8002, "preserve_node": null, "priority_group": 7, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "ratio": null, "replace_all_with": false, "reuse_nodes": true, "state": "present" } }, "item": { "pm": "10.1.20.102:8002", "pr": 7 }, "monitors": [], "state": "disabled" } TASK [Create LTM iRule] ************************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:20 Using network group action bigip for bigip_irule Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645 `" && echo ansible-tmp-1648665505.5119643-8503-258003356942645="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_irule.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmpkow82l0j TO /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645/AnsiballZ_bigip_irule.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645/ /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645/AnsiballZ_bigip_irule.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645/AnsiballZ_bigip_irule.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665505.5119643-8503-258003356942645/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "content": null, "module": "ltm", "name": "content-switch-phone", "partition": "Common", "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "src": "files/content-switch.tcl", "state": "present" } } } TASK [Create LTM Virtual] **********************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:27 Using network group action bigip for bigip_virtual_server Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318 `" && echo ansible-tmp-1648665509.5506809-8529-7028305058318="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_virtual_server.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmp6f6fq5i2 TO /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318/AnsiballZ_bigip_virtual_server.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318/ /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318/AnsiballZ_bigip_virtual_server.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318/AnsiballZ_bigip_virtual_server.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665509.5506809-8529-7028305058318/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "address_translation": null, "auto_last_hop": null, "bypass_module_checks": false, "check_profiles": true, "clone_pools": null, "default_persistence_profile": null, "description": null, "destination": "10.1.10.101", "disabled_vlans": null, "enabled_vlans": null, "fallback_persistence_profile": null, "firewall_enforced_policy": null, "firewall_staged_policy": null, "insert_metadata": true, "ip_intelligence_policy": null, "ip_protocol": null, "irules": [ "content-switch-phone" ], "mask": null, "metadata": null, "mirror": null, "name": "xyzapp1-Zone1", "partition": "Common", "policies": null, "pool": "xyzapp1-Zone1", "port": "80", "port_translation": null, "profiles": [ "http", "oneconnect" ], "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "rate_limit_dst_mask": null, "rate_limit_mode": "object", "rate_limit_src_mask": null, "security_log_profiles": null, "security_nat_policy": null, "snat": "automap", "source": null, "source_port": null, "state": "present", "type": "standard" } } } TASK [Create LTM Pool] *************************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:1 Using network group action bigip for bigip_pool Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980 `" && echo ansible-tmp-1648665516.0493083-8555-278170402089980="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmpsiqxd_f_ TO /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980/AnsiballZ_bigip_pool.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980/ /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980/AnsiballZ_bigip_pool.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980/AnsiballZ_bigip_pool.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665516.0493083-8555-278170402089980/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "aggregate": null, "description": null, "lb_method": "round-robin", "metadata": null, "monitor_type": null, "monitors": [ "http" ], "name": "xyzapp1-Zone2", "partition": "Common", "priority_group_activation": 1, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.248", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "quorum": null, "replace_all_with": false, "reselect_tries": null, "service_down_action": "reset", "slow_ramp_time": null, "state": "present" } }, "partition": "Common" } TASK [Create LTM Pool Members] *****************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:11 Using network group action bigip for bigip_pool_member Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581 `" && echo ansible-tmp-1648665520.7285328-8581-72787110634581="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool_member.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmp7zxj_sx_ TO /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581/AnsiballZ_bigip_pool_member.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581/ /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665520.7285328-8581-72787110634581/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => (item={'pm': '10.1.120.101:8001', 'pr': 10}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.120.101", "aggregate": null, "availability_requirements": null, "connection_limit": null, "description": null, "fqdn": null, "fqdn_auto_populate": null, "ip_encapsulation": null, "monitors": null, "name": null, "partition": "Common", "pool": "xyzapp1-Zone2", "port": 8001, "preserve_node": null, "priority_group": 10, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.248", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "ratio": null, "replace_all_with": false, "reuse_nodes": true, "state": "present" } }, "item": { "pm": "10.1.120.101:8001", "pr": 10 }, "monitors": [], "state": "disabled" } Using network group action bigip for bigip_pool_member connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801 `" && echo ansible-tmp-1648665523.691173-8581-164812464478801="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_pool_member.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmps202lcno TO /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801/AnsiballZ_bigip_pool_member.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801/ /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801/AnsiballZ_bigip_pool_member.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665523.691173-8581-164812464478801/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => (item={'pm': '10.1.120.102:8002', 'pr': 7}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.120.102", "aggregate": null, "availability_requirements": null, "connection_limit": null, "description": null, "fqdn": null, "fqdn_auto_populate": null, "ip_encapsulation": null, "monitors": null, "name": null, "partition": "Common", "pool": "xyzapp1-Zone2", "port": 8002, "preserve_node": null, "priority_group": 7, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.248", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "ratio": null, "replace_all_with": false, "reuse_nodes": true, "state": "present" } }, "item": { "pm": "10.1.120.102:8002", "pr": 7 }, "monitors": [], "state": "disabled" } TASK [Create LTM iRule] ************************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:20 Using network group action bigip for bigip_irule Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341 `" && echo ansible-tmp-1648665527.1681573-8631-33708876871341="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_irule.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmpgqzy3aym TO /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341/AnsiballZ_bigip_irule.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341/ /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341/AnsiballZ_bigip_irule.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341/AnsiballZ_bigip_irule.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665527.1681573-8631-33708876871341/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "content": null, "module": "ltm", "name": "content-switch-phone", "partition": "Common", "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.248", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "src": "files/content-switch.tcl", "state": "present" } } } TASK [Create LTM Virtual] **********************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/ltm_tasks.yaml:27 Using network group action bigip for bigip_virtual_server Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426 `" && echo ansible-tmp-1648665530.588571-8657-272278902816426="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_virtual_server.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmphujxcquz TO /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426/AnsiballZ_bigip_virtual_server.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426/ /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426/AnsiballZ_bigip_virtual_server.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426/AnsiballZ_bigip_virtual_server.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665530.588571-8657-272278902816426/ > /dev/null 2>&1 && sleep 0' ok: [localhost] => { "changed": false, "invocation": { "module_args": { "address_translation": null, "auto_last_hop": null, "bypass_module_checks": false, "check_profiles": true, "clone_pools": null, "default_persistence_profile": null, "description": null, "destination": "10.1.110.101", "disabled_vlans": null, "enabled_vlans": null, "fallback_persistence_profile": null, "firewall_enforced_policy": null, "firewall_staged_policy": null, "insert_metadata": true, "ip_intelligence_policy": null, "ip_protocol": null, "irules": [ "content-switch-phone" ], "mask": null, "metadata": null, "mirror": null, "name": "xyzapp1-Zone2", "partition": "Common", "policies": null, "pool": "xyzapp1-Zone2", "port": "80", "port_translation": null, "profiles": [ "http", "oneconnect" ], "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.248", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "rate_limit": null, "rate_limit_dst_mask": null, "rate_limit_mode": "object", "rate_limit_src_mask": null, "security_log_profiles": null, "security_nat_policy": null, "snat": "automap", "source": null, "source_port": null, "state": "present", "type": "standard" } } } TASK [include_tasks] ***************************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/create_app.yaml:17 included: /home/ansible/venv/20220328-xyz/attempt2/playbooks/gtm_tasks.yaml for localhost TASK [Create GTM Virtual Server] ***************************************************************task path: /home/ansible/venv/20220328-xyz/attempt2/playbooks/gtm_tasks.yaml:1 Using network group action bigip for bigip_gtm_virtual_server Loading collection ansible.netcommon from /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/ansible/netcommon connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended ESTABLISH LOCAL CONNECTION FOR USER: ansible EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671 `" && echo ansible-tmp-1648665536.5984328-8685-143281151331671="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmpoynqmlsu TO /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671/AnsiballZ_bigip_gtm_virtual_server.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671/ /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671/AnsiballZ_bigip_gtm_virtual_server.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671/AnsiballZ_bigip_gtm_virtual_server.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665536.5984328-8685-143281151331671/ > /dev/null 2>&1 && sleep 0' The full traceback is: File "/tmp/ansible_bigip_gtm_virtual_server_payload_mcm2lgrv/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1182, in main File "/tmp/ansible_bigip_gtm_virtual_server_payload_mcm2lgrv/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 940, in exec_module File "/tmp/ansible_bigip_gtm_virtual_server_payload_mcm2lgrv/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 964, in present File "/tmp/ansible_bigip_gtm_virtual_server_payload_mcm2lgrv/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1008, in create File "/tmp/ansible_bigip_gtm_virtual_server_payload_mcm2lgrv/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1054, in create_on_device failed: [localhost] (item={'datacenter_name': 'Zone1', 'vip_address': '10.1.10.101:80', 'pool_members': [{'pm': '10.1.20.101:8001', 'pr': 10}, {'pm': '10.1.20.102:8002', 'pr': 7}]}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.10.101", "availability_requirements": null, "limits": null, "link": null, "monitors": null, "name": "10.1.10.101:80", "partition": "Common", "port": 80, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "server_name": "Zone1", "state": "present", "translation_address": null, "translation_port": null, "virtual_server_dependencies": null } }, "item": { "datacenter_name": "Zone1", "pool_members": [ { "pm": "10.1.20.101:8001", "pr": 10 }, { "pm": "10.1.20.102:8002", "pr": 7 } ], "vip_address": "10.1.10.101:80" }, "msg": "b'{\"code\":404,\"message\":\"Public URI path not registered: /tm/gtm/server/?Common?Zone1/virtual-servers/\",\"referer\":\"10.1.1.169\",\"restOperationId\":9470295,\"kind\":\":resterrorresponse\"}'" } Using network group action bigip for bigip_gtm_virtual_server connection transport is rest ANSIBLE_NETWORK_IMPORT_MODULES: disabled ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended EXEC /bin/sh -c 'echo ~ansible && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp `"&& mkdir "` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964 `" && echo ansible-tmp-1648665539.8313775-8685-1059064586964="` echo /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964 `" ) && sleep 0' Using module file /home/ansible/venv/20220328-xyz/attempt2/playbooks/collections/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py PUT /home/ansible/.ansible/tmp/ansible-local-8420wjemc_o7/tmp5vlzkd9k TO /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964/AnsiballZ_bigip_gtm_virtual_server.py EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964/ /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964/AnsiballZ_bigip_gtm_virtual_server.py && sleep 0' EXEC /bin/sh -c '/home/ansible/venv/20220328-xyz/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964/AnsiballZ_bigip_gtm_virtual_server.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1648665539.8313775-8685-1059064586964/ > /dev/null 2>&1 && sleep 0' The full traceback is: File "/tmp/ansible_bigip_gtm_virtual_server_payload_4687vlwc/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1182, in main File "/tmp/ansible_bigip_gtm_virtual_server_payload_4687vlwc/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 940, in exec_module File "/tmp/ansible_bigip_gtm_virtual_server_payload_4687vlwc/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 964, in present File "/tmp/ansible_bigip_gtm_virtual_server_payload_4687vlwc/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1008, in create File "/tmp/ansible_bigip_gtm_virtual_server_payload_4687vlwc/ansible_bigip_gtm_virtual_server_payload.zip/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_gtm_virtual_server.py", line 1054, in create_on_device failed: [localhost] (item={'datacenter_name': 'Zone2', 'vip_address': '10.1.110.101:80', 'pool_members': [{'pm': '10.1.120.101:8001', 'pr': 10}, {'pm': '10.1.120.102:8002', 'pr': 7}]}) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "address": "10.1.110.101", "availability_requirements": null, "limits": null, "link": null, "monitors": null, "name": "10.1.110.101:80", "partition": "Common", "port": 80, "provider": { "auth_provider": null, "no_f5_teem": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.247", "server_port": 443, "timeout": null, "transport": "rest", "user": "admin", "validate_certs": false }, "server_name": "Zone2", "state": "present", "translation_address": null, "translation_port": null, "virtual_server_dependencies": null } }, "item": { "datacenter_name": "Zone2", "pool_members": [ { "pm": "10.1.120.101:8001", "pr": 10 }, { "pm": "10.1.120.102:8002", "pr": 7 } ], "vip_address": "10.1.110.101:80" }, "msg": "b'{\"code\":404,\"message\":\"Public URI path not registered: /tm/gtm/server/?Common?Zone2/virtual-servers/\",\"referer\":\"10.1.1.169\",\"restOperationId\":9470589,\"kind\":\":resterrorresponse\"}'" } PLAY RECAP *************************************************************************************localhost : ok=11 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ``` ```
ghost commented 2 years ago

Any update on this?

KrithikaChidambaram commented 1 year ago

Hi, internal ID to track this item is: INFRAANO-982, thanks!

urohit011 commented 1 year ago

Hi @tashafan , I looked up the repo https://github.com/focrensh/f5-ansible_multi-zone to reproduce the issue. I noticed that task that creates GTM virtual servers in gtm_tasks.yaml is referencing GTM servers (different from the GTM virtual servers), but didn't see any tasks mean for creating those, so I think you need to create the GTM servers before running the tasks in gtm_tasks.yaml.

pgouband commented 1 year ago

Hi,

Please reopen if you are still facing the issue.