Commit Graph

8 Commits

Author SHA1 Message Date
Marc Gariepy 0a244ca090 auto-detect interpreter
setting ANSIBLE_PYTHON_INTERPRETER to auto will use the value from the
ansible/config/base.yml

debian gets a /usr/bin/python3 for now and need to revisit once we have
ansible 2.10.

Change-Id: I503c1b71c0d01eea668500c0125c752c0584a7ef
Co-Authored-By: Jonathan Rosser <jonathan.rosser@rd.bbc.co.uk>
2020-06-11 14:43:02 -04:00
Jesse Pretorius 85b51389cc Use local connection and become for localhost plays
When targeting localhost with 'remote_user: root' and
using 'become: yes' we lose the environment variables
for the user running the playbook (eg: USER, HOME).

However, if we use 'connection: local' and 'become: yes'
together, it works properly.

To ensure these plays have the correct access to change
things on the host, we apply this change to them all.

We also ensure that 'become: no' is explicitly set on
any local connection plays to make the intent more
obvious. Finally, we also use 'yes' and 'no' uniformly.

Change-Id: I6e4607dd4aaffa0bfcda254103697bf9b28eca1a
2018-07-14 14:37:06 +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 9776f4e07a Move database creation into role (horizon)
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we remove the test-vars which were duplicated from the
role, and remove the DB setup tasks as they are no longer required.

Change-Id: I5387011d12bc4f61f6dfa08f86bbf7cc9378022d
Depends-On: https://review.openstack.org/571755
2018-06-01 15:54:53 +01:00
Jean-Philippe Evrard d2d8daae74 Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: Ied6126021bc19fb842541a3234a1005fd16df619
2018-04-19 18:11:06 +02: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 b1a5beab2f Add Horizon to tests repo - for use with Translations testing
Translations team are looking to use OSA to test translations during
cycle. It would be useful to have the horizon vars setup in the tests
repo so we can utilise these from a separate repository.

Change-Id: Iffbaa7f94d512e5dcc3e348bd4ccd0ffeaa1ca13
2017-04-04 15:05:43 +01:00