f5alliances / ansible-use-cases-101

1 stars 2 forks source link

Playbooks 1.1 to 1.6 do not work with Ansible 2.9, Parameters deprecated #17

Open cavalen opened 4 years ago

cavalen commented 4 years ago

Running a playbook in Ansible 2.9.1

TASK [COLLECT BIG-IP FACTS] ******************************************************************************************
fatal: [f5]: FAILED! => changed=false
  ansible_facts:
    discovered_interpreter_python: /usr/bin/python
  msg: 'Unsupported parameters for (bigip_device_facts) module: password, server, server_port, user, validate_certs Supported parameters include: gather_subset, provider'

Running the same playbook in Ansible 2.8.0

PLAY [GRAB F5 FACTS] **********************************************************************************************************************

TASK [COLLECT BIG-IP FACTS] ***************************************************************************************************************
[DEPRECATION WARNING]: Param 'server' is deprecated. See the module docs for more information. This feature will be removed in version
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'user' is deprecated. See the module docs for more information. This feature will be removed in version 2.9.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'server_port' is deprecated. See the module docs for more information. This feature will be removed in
version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'password' is deprecated. See the module docs for more information. This feature will be removed in version
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Param 'validate_certs' is deprecated. See the module docs for more information. This feature will be removed in
version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward
compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host.
See https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more information. This feature will be
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
changed: [localhost]

TASK [DISPLAY ONLY THE VERSION] ***********************************************************************************************************
ok: [localhost] => {
    "device_facts['system_info']['product_version']": "13.1.0.5"
}

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

The Ansible CentOS server deployed by the f5_provisioner container install Ansible 2.9.1

gavinw2006 commented 4 years ago

I hit this issue too. the below is my note.

image

gavinw2006 commented 4 years ago

image

payalsin commented 4 years ago

Documentation is being fixed. The parameter 'provider' needs to be used moving forward. Example: https://github.com/f5alliances/ansible-use-cases-101/blob/master/1.2-add-node/bigip-node.yml

All code and examples are being changed to use 'provider'