Guys,
I have a very simple task that works on Ansible 2.0 (both first and
subsequent runs) but, doesn't work on Ansible 2.1 (only subsequent runs
fails, first run also works on 2.1), as follows:
My group_vars/all have:
---
os_external: "dummy0"
---
my task have:
---
- name: Configuring Open vSwitch Bridge Port
openvswitch_port: bridge=br-ex port="{{os_external}}" state=present
when: br_mode == 'OVS'
---
With Ansible 2.1, all subsequent runs fails, like this:
---
TASK [os_neutron : Configuring Open vSwitch Bridge Port]
***********************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"'str' object has no attribute 'items'"}
to retry, use: --limit @site-openstack.retry
---
So, as a workaround, I have to downgrade Ansible, like this:
(NOTE: Ansible 2.1 is installed in my Ubuntu 16.04 via
"ppa:ansible/ansible".)
---
root@dell-desk-1:~# ppa-purge ppa:ansible/ansible
Updating packages lists
PPA to be removed: ansible ansible
Package revert list generated:
ansible/xenial
Disabling ansible PPA from
/etc/apt/sources.list.d/ansible-ubuntu-ansible-xenial.list
Updating packages lists
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.0.0.2-2' (Ubuntu:16.04/xenial [all]) for 'ansible'
The following additional packages will be installed:
python-selinux
The following NEW packages will be installed:
python-selinux
The following packages will be *DOWNGRADED*:
ansible
0 upgraded, 1 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 1,190 kB of archives.
After this operation, 630 kB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 ansible all
2.0.0.2-2 [1,016 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64
python-selinux amd64 2.4-3build2 [173 kB]
Fetched 1,190 kB in 0s (3,183 kB/s)
dpkg: warning: downgrading ansible from 2.1.0.0-1ppa~xenial to 2.0.0.2-2
(Reading database ... 336785 files and directories currently installed.)
Preparing to unpack .../ansible_2.0.0.2-2_all.deb ...
*Unpacking ansible (2.0.0.2-2) over (2.1.0.0-1ppa~xenial) ...*
Selecting previously unselected package python-selinux.
Preparing to unpack .../python-selinux_2.4-3build2_amd64.deb ...
Unpacking python-selinux (2.4-3build2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ansible (2.0.0.2-2) ...
Installing new version of config file /etc/ansible/ansible.cfg ...
Installing new version of config file /etc/ansible/hosts ...
Setting up python-selinux (2.4-3build2) ...
PPA purged successfully
---
Now, playbook works:
---
TASK [os_neutron : Configuring Open vSwitch Bridge Port]
***********************
ok: [localhost]
---
Just to make sure that Ansible 2.1 is failing again:
---
root@dell-desk-1:~# add-apt-repository ppa:ansible/ansible
root@dell-desk-1:~# apt update
root@dell-desk-1:~# apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
python-selinux
Use 'sudo apt autoremove' to remove it.
The following packages will be *upgraded:*
* ansible*
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,233 kB of archives.
After this operation, 1,675 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/ansible/ansible/ubuntu xenial/main amd64
ansible all 2.1.0.0-1ppa~xenial [1,233 kB]
Fetched 1,233 kB in 1s (1,110 kB/s)
(Reading database ... 336622 files and directories currently installed.)
Preparing to unpack .../ansible_2.1.0.0-1ppa~xenial_all.deb ...
*Unpacking ansible (2.1.0.0-1ppa~xenial) over (2.0.0.2-2) ...*
Processing triggers for man-db (2.7.5-1) ...
Setting up ansible (2.1.0.0-1ppa~xenial) ...
Installing new version of config file /etc/ansible/ansible.cfg ...
Installing new version of config file /etc/ansible/hosts ...
---
Fails (with Ansible 2.1):
---
TASK [os_neutron : Configuring Open vSwitch Bridge Port]
***********************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"'str' object has no attribute 'items'"}
to retry, use: --limit @site-openstack.retry
---
What am I missing?
Thanks!
Thiago
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5b981944-947d-4b8d-b94f-5e4e640cc6e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.