mirror of https://github.com/ceph/ceph-ansible.git
tests: isolate ansible collections
When Ansible collections are installed, they should be isolated.
Otherwise, they will be shared in any scheduled job.
This might cause issues when running different branch versions for instance.
This also replace `ANSIBLE_CALLBACK_WHITELIST` with `ANSIBLE_CALLBACK_ENABLED` as it's
going to be deprecated in Ansible 2.15.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 50b7a12ad8
)
pull/7286/head
parent
fa1338b886
commit
7c8bc62add
|
@ -13,8 +13,9 @@ passenv=*
|
|||
sitepackages=True
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
|
@ -27,6 +28,7 @@ deps= -r{toxinidir}/tests/requirements.txt
|
|||
changedir= {toxinidir}/tests/functional/cephadm
|
||||
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ passenv=*
|
|||
sitepackages=True
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
|
@ -27,6 +28,7 @@ deps= -r{toxinidir}/tests/requirements.txt
|
|||
changedir= {toxinidir}/tests/functional/docker2podman
|
||||
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ whitelist_externals =
|
|||
passenv=*
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
# only available for ansible >= 2.5
|
||||
|
@ -30,6 +31,7 @@ setenv=
|
|||
deps= -r{toxinidir}/tests/requirements.txt
|
||||
changedir={toxinidir}/tests/functional/external_clients{env:CONTAINER_DIR:}
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ whitelist_externals =
|
|||
passenv=*
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
# only available for ansible >= 2.5
|
||||
|
@ -35,6 +36,7 @@ setenv=
|
|||
deps= -r{toxinidir}/tests/requirements.txt
|
||||
changedir={toxinidir}/tests/functional/filestore-to-bluestore{env:CONTAINER_DIR:}
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ passenv=*
|
|||
sitepackages=True
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
|
@ -31,6 +32,7 @@ deps= -r{toxinidir}/tests/requirements.txt
|
|||
changedir= {toxinidir}/tests/functional/podman
|
||||
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -52,8 +52,9 @@ passenv=*
|
|||
sitepackages=False
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
|
@ -80,6 +81,8 @@ changedir=
|
|||
|
||||
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
@ -114,4 +117,4 @@ commands=
|
|||
# retest to ensure OSDs are well redeployed
|
||||
py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
|
||||
|
||||
vagrant destroy --force
|
||||
vagrant destroy --force
|
||||
|
|
|
@ -12,8 +12,9 @@ whitelist_externals =
|
|||
passenv=*
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
# only available for ansible >= 2.5
|
||||
|
@ -33,6 +34,7 @@ setenv=
|
|||
deps= -r{toxinidir}/tests/requirements.txt
|
||||
changedir={toxinidir}/tests/functional/subset_update{env:CONTAINER_DIR:}
|
||||
commands=
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||
|
||||
|
|
|
@ -9,11 +9,13 @@ whitelist_externals =
|
|||
bash
|
||||
git
|
||||
pip
|
||||
rm
|
||||
passenv=*
|
||||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACK_ENABLED = profile_tasks
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
# only available for ansible >= 2.5
|
||||
|
@ -38,7 +40,7 @@ commands=
|
|||
# use the stable-6.0 branch to deploy an octopus cluster
|
||||
git clone -b stable-6.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
|
||||
pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
|
||||
ansible-galaxy install -r {envdir}/tmp/ceph-ansible/requirements.yml -v
|
||||
ansible-galaxy collection install -r {envdir}/tmp/ceph-ansible/requirements.yml -v -p {envdir}/ansible_collections
|
||||
|
||||
|
||||
bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml'
|
||||
|
@ -71,8 +73,9 @@ commands=
|
|||
"'
|
||||
|
||||
pip uninstall -y ansible
|
||||
rm -rf {envdir}/ansible_collections
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
pip install -r {toxinidir}/tests/requirements.txt
|
||||
ansible-galaxy install -r {toxinidir}/requirements.yml -v -f
|
||||
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
|
||||
ireallymeanit=yes \
|
||||
ceph_docker_registry_auth=True \
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -270,10 +270,11 @@ sitepackages=False
|
|||
setenv=
|
||||
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
||||
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
||||
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
||||
ANSIBLE_CALLBACKS_ENABLED = profile_tasks
|
||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||
ANSIBLE_CACHE_PLUGIN = memory
|
||||
ANSIBLE_GATHERING = implicit
|
||||
ANSIBLE_COLLECTIONS_PATH = {envdir}
|
||||
# only available for ansible >= 2.5
|
||||
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||
non_container: DEV_SETUP = True
|
||||
|
@ -326,7 +327,7 @@ changedir=
|
|||
cephadm_adopt: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
||||
|
||||
commands=
|
||||
ansible-galaxy install -r {toxinidir}/requirements.yml -v
|
||||
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
|
||||
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
|
||||
|
||||
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||
|
|
Loading…
Reference in New Issue