Commit Graph

10 Commits

Author SHA1 Message Date
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
Jean-Philippe Evrard 2d924b773d Fix usage of "|" for tests
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
2018-07-12 16:44:20 +02: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
Jimmy McCrory 2690270a75 Use package module to install lvm2
The lvm2 package has the same name across supported distros so a single
package task can be used.

Change-Id: Ifbf648d3f3604ae3e727a853b512d5b34ba059ac
2017-11-21 11:15:24 -06:00
Jesse Pretorius 5308271fc9 Fix ansible-lint test failures for cinder
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: I90d6673316b836b99bf792dd4586c69fd65af39c
2017-11-21 11:01:53 +00:00
Major Hayden 354eb1ac81
Add dnf support
This patch adds dnf support for CentOS.

Implements: blueprint centos-and-dnf
Change-Id: I0609d79e98d773af8e431bd520b04a2c893211bc
2017-08-02 15:02:02 -05:00
Jimmy McCrory b0be2e9327 Fix role gate tests for Ansible 2.3
In Ansible 2.3, 'ansible_user' seems to be undefined unless set within
the inventory for a host. 'ansible_user_id' contains the current user
running Ansible, but is only set after facts are gathered.

Change-Id: Id5b76a87809f03951c954fc3d752419a673403f7
2017-04-19 00:11:36 -07:00
Andy McCrae 1b64f1e0e8 Revert "Run cinder-setup against cinder_volume hosts"
The setup commands won't work against a container properly - we need to
revert this and if we need to configure LVM in a container, have a
separate play.

This reverts commit da95d3e4ee.

Change-Id: I66feb6b432ce14e78d4f96a4bd87aa8e021e08e3
2017-01-04 12:34:57 +00:00
Andy McCrae da95d3e4ee Run cinder-setup against cinder_volume hosts
Only setup cinder volumes on cinder_volume hosts rather than
"localhost", this will mean we can run cinder_volume in containers for
testing rather than only against localhost.

Change-Id: I28e713823fc8b7dffa8f943a1af96ec9f29d403b
2016-12-21 18:15:31 +00:00
Andy McCrae b0b568f27a Add Cinder setup/vars to central test repository
The cinder role is used in further testing (potentially by Swift, and
Nova, etc.) this PR moves it to be part of the central testing
repository and incorporates it's variables as well as it's setup and
configuration plays.

Change-Id: Ibe2bcd91af9eac099e86e92f9294ed04fffe7b95
2016-10-04 17:04:52 +01:00