mirror of https://github.com/ceph/ceph-ansible.git
tests: do not play dev_setup on containerized deployment
using `!` mark in tox.ini doesn't work on comma separated list. The idea here is to skip all containerized scenario in dev_setup.yml and use the `!` for the update scenario. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3557/head
parent
0745fefb88
commit
25d8198c5d
|
@ -7,27 +7,29 @@
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
|
||||||
- name: set_fact group_vars_path
|
- block:
|
||||||
set_fact:
|
- name: set_fact group_vars_path
|
||||||
group_vars_path: "{{ change_dir + '/hosts' if 'ooo-collocation' in change_dir.split('/') else change_dir + '/group_vars/all' }}"
|
set_fact:
|
||||||
|
group_vars_path: "{{ change_dir + '/hosts' if 'ooo-collocation' in change_dir.split('/') else change_dir + '/group_vars/all' }}"
|
||||||
|
|
||||||
- name: change ceph_repository to 'dev'
|
- name: change ceph_repository to 'dev'
|
||||||
replace:
|
replace:
|
||||||
regexp: "ceph_repository:.*"
|
regexp: "ceph_repository:.*"
|
||||||
replace: "ceph_repository: dev"
|
replace: "ceph_repository: dev"
|
||||||
dest: "{{ group_vars_path }}"
|
dest: "{{ group_vars_path }}"
|
||||||
when: change_dir is defined
|
when: change_dir is defined
|
||||||
|
|
||||||
- name: change nfs-ganesha repository to 'dev'
|
- name: change nfs-ganesha repository to 'dev'
|
||||||
replace:
|
replace:
|
||||||
regexp: "nfs_ganesha_stable=.*"
|
regexp: "nfs_ganesha_stable=.*"
|
||||||
replace: "nfs_ganesha_stable=False"
|
replace: "nfs_ganesha_stable=False"
|
||||||
dest: "{{ group_vars_path }}"
|
dest: "{{ group_vars_path }}"
|
||||||
replace:
|
replace:
|
||||||
regexp: "nfs_ganesha_dev:.*"
|
regexp: "nfs_ganesha_dev:.*"
|
||||||
replace: "nfs_ganesha_dev=True"
|
replace: "nfs_ganesha_dev=True"
|
||||||
dest: "{{ group_vars_path }}"
|
dest: "{{ group_vars_path }}"
|
||||||
when: change_dir is defined
|
when: change_dir is defined
|
||||||
|
|
||||||
- name: print contents of {{ group_vars_path }}
|
- name: print contents of {{ group_vars_path }}
|
||||||
command: "cat {{ group_vars_path }}"
|
command: "cat {{ group_vars_path }}"
|
||||||
|
when: dev_setup
|
3
tox.ini
3
tox.ini
|
@ -215,6 +215,7 @@ setenv=
|
||||||
ANSIBLE_KEEP_REMOTE_FILES = 1
|
ANSIBLE_KEEP_REMOTE_FILES = 1
|
||||||
# only available for ansible >= 2.5
|
# only available for ansible >= 2.5
|
||||||
ANSIBLE_STDOUT_CALLBACK = yaml
|
ANSIBLE_STDOUT_CALLBACK = yaml
|
||||||
|
non_container: DEV_SETUP = True
|
||||||
centos: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
|
centos: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
|
||||||
fedora: CEPH_ANSIBLE_VAGRANT_BOX = fedora/29-atomic-host
|
fedora: CEPH_ANSIBLE_VAGRANT_BOX = fedora/29-atomic-host
|
||||||
# Set the vagrant box image to use
|
# Set the vagrant box image to use
|
||||||
|
@ -271,7 +272,7 @@ changedir=
|
||||||
|
|
||||||
commands=
|
commands=
|
||||||
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
|
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
|
||||||
!container,update: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "change_dir={changedir} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"
|
!update: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "dev_setup={env:DEV_SETUP:False} change_dir={changedir} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"
|
||||||
|
|
||||||
vagrant up --no-provision {posargs:--provider=virtualbox}
|
vagrant up --no-provision {posargs:--provider=virtualbox}
|
||||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||||
|
|
Loading…
Reference in New Issue