With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.
This should fix it.
Change-Id: Ida90a5a717adaf07ebf2ee6f04136fe920cfe46b
It makes no sense to use become when you're connecting to a
host via the root remote_user. As such, we remove all uses of
'become: true' from the test plays with the exception of the
'test-prepare-keys.yml' playbook which uses a local connection
rather than a remote one and it therefore needs to use become.
We also transition all plays to use 'remote_user' which is the
correct parameter to replace 'user' (since ansible 1.4).
Finally, we switch the horizon nova service setup to its own
playbook using a local connection and the upstream keystone
modules.
Change-Id: I20517c22f07b1bb811a51d8c63741604360fe7f8
With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.
Change-Id: I76157ccedfbcb8b0c2cba852bfa6b78ba6981c6c
Sometimes a test will result in a failure, but it
takes more time than necessary to find the failure
due to Ansible continuing to execute on other hosts
after removing one from the play execution.
This patch ensures that any error will result in
an immediate failure so that the fatal error is
easier to find.
Change-Id: I4e89bfdb1e48d0ac65f9fb8549e55a19ab773f9f
Commit 01444b18c8 ("test-setup-swifthosts: Optimize xfsprogs
installation") switched from using distro specific package manager
modules to a simpler solution provided by the 'package' module. However,
this had unexpected consequences when the task is delegated. In this
case, the detection depends on hostvars['localhost']['ansible_pkg_mgr']
being populated. However, this may not always be true since it depends
on us having executed the 'setup' module on localhost during this
playbook. As such the following error may occur:
2017-07-13 15:40:15.895582 | fatal: [swift-storageB1 -> localhost]: FAILED! => {
2017-07-13 15:40:15.895647 | "changed": false,
2017-07-13 15:40:15.895677 | "failed": true,
2017-07-13 15:40:15.895742 | "msg": "Could not detect which package manager to use. Try gathering facts or setting the \"use\" option."
2017-07-13 15:40:15.895771 | }
Fixes: 01444b18c8 ("test-setup-swifthosts: Optimize xfsprogs installation")
Change-Id: I96c02fb2ee26691f1d7dd449d7205baa231795fe
The 'xfsprogs' package is common across all distributions so improve
the playbook by using the 'package' Ansible module to install the
package on every distribution.
Change-Id: I86e5080e75b06f6252858978eaa62b5aa83cd87c
After configuring the bind mounts in the container, we used a
task to wait for SSH to respond on the container, using the
Ansible wait_for module trying to connect to port 22.
When managing containers in Ansible using other connection plugins
that use LXC commands on the physical host to execute modules,
there may not be an SSH daemon running within the container. In
these situations we can accomplish the same check without SSH by
using the wait_for_connection module (new in ansible 2.3) to verify
that Ansible has a working execution path into the container, but
not necessarily via SSH.
Change-Id: I25978a3043af1df1613f41e479b7f058d64f685d
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.
In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost. It will also
need to be defined in plays that delegate to localhost.
Change-Id: Ifb5e907594ca5fba459ee5a90b202e17db081f9a
Replacing usage of ansible_ssh_host, ansible_ssh_user,
ansible_ssh_port with ansible_host, ansible_user and ansible_port
Depends-On: I35371879a87c115f219cd181245fe59f6d7d3f77
Change-Id: I97c3958c406b44b271d361860516d0b903438a83