Commit Graph

10 Commits

Author SHA1 Message Date
ZhijunWei b2bce755e0 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I55394d053218016be20fa9b2c92cefc1473d5c64
2018-09-09 08:04:47 +00:00
Jesse Pretorius b41cf9dd30 Implement clouds.yaml for root user
The use of clouds.yaml from the zuul user does not
work for swift due to the mess of delegation and
become. In this patch we ensure that it is also
there for the root user so that the role test can
pass.

This issue does not apply to the integrated repo.

Change-Id: Ia152f9c24e4965f89d9477f4e343428bb04b3c59
2018-07-31 14:40:47 +01:00
Jesse Pretorius 839aec5abe Ensure remote_user and become are consistently implemented
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
2018-07-06 09:45:29 +01:00
Jesse Pretorius dad9515c35 Implement any_errors_fatal for all test playbooks
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
2017-07-17 10:09:11 +00:00
Jimmy McCrory 84ebca7228 Add become to all plays
The swift role includes tasks that delegate to the physical host of
containers (localhost in gate tests). Since ansible_become was removed
from localhost's vars, set become in this play to fix tests that install
swift.

Also add the become option to all other plays to avoid this issue for
any other roles that may now or in the future delegate tasks to localhost.

Change-Id: I08cada62636a1a7a1e2c1b15e0052876437e24aa
2017-04-23 02:17:55 +00:00
Andy McCrae e41eea30ba Remove swift_storage/replication_address pretasks
We have moved the calculation of the swift_repl and storage addresses to
the swift role itself, to ensure uniformity:

https://review.openstack.org/#/c/375528/

As a result, this PR removes these steps from the playbook as they are
now redundant.

Change-Id: Iac72c99fc728fad82da65ae6c68a304e3d130bc1
2016-09-26 14:16:33 +01:00
Andy McCrae ac81a5c112 Adjust test-install-swift to work for MR swift
This change mirrors a change made in the os-swift repo, the change was
not ported to the openstack-ansible-tests repo.

This change is required to ensure the appropriate hosts are used to
calculate the md5sum of the swift files post distribution.

Change-Id: I76bbf5ba19bb43712f984ac3841616d84fd5def1
2016-09-19 16:21:38 +01:00
Andy McCrae ec28d2a6e2 Genericize rolenames 2016-05-23 15:45:17 +01:00
Andy McCrae 8f8b4eaf86 Role names should change from basename 2016-05-23 15:09:07 +01:00
Andy McCrae 7f97581e0b Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00