---
# System prepended metadata

title: Ansible 2.11 issues

---

# Ansible 2.11 issues

###### tags: DF

example logs: [ansible.log](https://712ac3d51bebfb746ee2-45cb8a8464d92a2a0b879497ddd27ce4.ssl.cf1.rackcdn.com/797823/3/check/tripleo-ci-centos-8-content-provider/e0e21f4/logs/undercloud/home/zuul/ansible.log) from content provider

[ansible.log](https://8850b2db3e1eddfb0969-c36d4b8e22685faa8d8d3b6482fd29b5.ssl.cf1.rackcdn.com/797823/3/check/tripleo-ci-centos-8-containers-multinode/6834ff7/logs/undercloud/home/zuul/ansible.log) from undercloud install

- [ ] Render out the hosts entries | undercloud | error={"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'hostname_resolve_network'\n\nThe error appears to be in '/usr/share/ansible/roles/tripleo_hosts_entries/tasks/main.yml': line 51, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Render out the hosts entries\n  ^ here\n"}
from [Undercloud install log](https://33f0fa69ac3ea7dd011a-dd7612090ddd37717fc79d2c5d5bec61.ssl.cf1.rackcdn.com/797823/3/check/tripleo-ci-centos-8-containers-multinode/a39f8a9/logs/undercloud/home/zuul/undercloud_install.log)

    * The problem is with ANSIBLE_VARS_PLUGIN_STAGE=inventory in ansible 2.11, it doesn't work, see https://github.com/ansible/ansible/issues/72590
    * Trying to work on: https://review.opendev.org/c/openstack/python-tripleoclient/+/800955 and https://review.opendev.org/c/openstack/python-tripleoclient/+/800956

- [x] [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the 
controller starting with Ansible 2.12. Current version: 3.6.8 (default, May  8 
2021, 09:11:34) [GCC 8.4.1 20210423 (Red Hat 8.4.1-2)]. This feature will be 
removed from ansible-core in version 2.12. Deprecation warnings can be disabled
 by setting deprecation_warnings=False in ansible.cfg.
     * deprecated in 2.12, so we are good.
     * set ANSIBLE_CONTROLLER_PYTHON_WARNING=False
 
- [ ] [DEPRECATION WARNING]: ANSIBLE_CALLBACK_WHITELIST option, normalizing names to 
new standard, use ANSIBLE_CALLBACKS_ENABLED instead. This feature will be 
removed from ansible-core in version 2.15. Deprecation warnings can be disabled
 by setting deprecation_warnings=False in ansible.cfg.
     * All ANSIBLE_CALLBACK_WHITELIST should be replaced by ANSIBLE_CALLBACKS_ENABLED after moving to 2.11
 
- [ ] [WARNING]: tripleo_free run_once does not ensure a task is successful for a
given playbook but rather it is only attempted to execute once.

- [ ] [WARNING]: any_errors_fatal only stops any future tasks running on the host
that fails with the tripleo_free strategy.

- [ ] [WARNING]: Collection ansible.netcommon does not support Ansible version 2.11.2
    * ansible.netcommon collection should be updated to latest 2.2.0
    * waiting on building ansible.utils as a dependency

- [ ] WARNING | Module remote_tmp /tmp/ansible-root did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually

- [ ] CHANGED | Write container-puppet.sh [WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: '{{ playbook_dir }}/{{
_task_file_path }}' is exists


- [ ] [WARNING]: ('undercloud -> localhost', 'fa163e0d-a5a8-f0a0-b88a-0000000000f3') missing from stats

- [ ] ERROR tripleoclient.utils.utils [-] sudo failed: b"cp: cannot create regular file '/var/lib/tripleo/archive': No such file or directory\n": subprocess.CalledProcessError: Command '['sudo', 'cp', '/home/zuul/overcloud-deploy/overcloud/overcloud-install-20210629174841.tar.bzip2', '/var/lib/tripleo/archive']' returned non-zero exit status 1.

- [ ] ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] Exception archiving deploy artifacts: RuntimeError: sudo failed: b"cp: cannot create regular file '/var/lib/tripleo/archive': No such file or directory\n"

- [ ] ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] sudo failed: b"cp: cannot create regular file '/var/lib/tripleo/archive': No such file or directory\n": RuntimeError: sudo failed: b"cp: cannot create regular file '/var/lib/tripleo/archive': No such file or directory\n"
- [x] /usr/lib/python3.6/site-packages/oslo_utils/fnmatch.py:25: DeprecationWarning: Using the oslo.utils's 'fnmatch' module is deprecated, please use the stdlib 'fnmatch' module.
    * this is not Ansible 2.11 problem
- [ ] resource unclosed file messages:
```
/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py:587: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.24.1', 38144), raddr=('192.168.24.1', 8006)>
 
 utils.launch_heat(self.heat_launcher, restore_db=restore_db)
 /usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleo2kbifmhr/d9091ab1-1fe4-4a37-9416-994b4a3f914e/stdout' mode='r' encoding='UTF-8'>
 
 f.write(runner.stdout.read())
 
 /usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleondk6lxcy/d9091ab1-1fe4-4a37-9416-994b4a3f914e/stdout' mode='r' encoding='UTF-8'>
```
 
 