As for U we don't support debian stretch, there is no need
in having stretch CI jobs. Buster ones should be used instead.
This also fixes ara report
Needed-by: https://review.opendev.org/706285
Change-Id: I554e512968718492ce6056b29b0612e450f0856b
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
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
Similar to commit 3393b887a89a("Setup initial key with connection:
local") we need to use local connection to configure the ssh keys for
the user as well.
Change-Id: I3d7adc78f565e7c7b69e9fecc880612157774b3b
We need to use "connection: local" in order to setup the intial SSH keys
which will then allow remote connections to localhost.
Change-Id: I44997d6ca8ea2e5d15a2053cc2b00ad63c395db6
In Ansible 2.3 the local connection plugin overrides
the host vars for the ansible_python_interpreter,
causing tests to use the wrong interpreter and
install python packages into unexpected locations.
This is especially visible when using host
delegation to localhost instead of the targeting
localhost directly.
To ensure that the behaviour remains consistent with
our expectations all local connection usage for
localhost is removed and localhost is targeted as
a remote host.
Change-Id: Ifcccf3c25aa10085b35017b01644354e10eca15a
Using ansible_user_id to determine the primary group for a user implies
that such a group exists in the first place. Unfortunately this is not
always the case. For example, openSUSE does not create a new group for
every user but places all of them in the 'users' group. As such, avoid
using ansible_user_id and switch to ansible_user_gid which provides a
numeric value for the user's primary group.
Change-Id: I4fcea3e9bc9fa34998ab1a07e2c6bf60738e1fc1
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
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
The key prep playbook has been changed to ensure non-root
users are able to run tests in containers.
Change-Id: I5c008888f790a07f034bbe9b96e3df0694d67920
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Change so that local ssh is no longer assumed to be available. The
tasks for keyfile generation and insertion as root are now done
in the same place.
When running on an APT systems the backports repo will be made available
if its found within the sources list file.
Change-Id: I9c16378cee3862cd8ce2d87e8c5483533f98c94d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>