diff --git a/site.yml.sample b/site.yml.sample index 428bce521..1585a6e88 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -19,6 +19,9 @@ tags: - always + vars: + delegate_facts_host: True + tasks: # If we can't get python2 installed before any module is used we will fail # so just try what we can to get it installed @@ -40,11 +43,18 @@ when: - systempython2.stat.exists is undefined or systempython2.stat.exists == false + - name: gather facts + setup: + when: + - not delegate_facts_host | bool + - name: gather and delegate facts setup: delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] }}" + when: + - delegate_facts_host | bool - name: install required packages for fedora > 23 raw: sudo dnf -y install python2-dnf libselinux-python ntp diff --git a/tox.ini b/tox.ini index cc4b7212d..f9a18cc21 100644 --- a/tox.ini +++ b/tox.ini @@ -126,6 +126,7 @@ setenv= ANSIBLE_CALLBACK_WHITELIST = profile_tasks # only available for ansible >= 2.2 ANSIBLE_STDOUT_CALLBACK = debug + ansible2.2: DELEGATE_FACTS_HOST = False docker_cluster: PLAYBOOK = site-docker.yml.sample docker_cluster_collocation: PLAYBOOK = site-docker.yml.sample update_docker_cluster: PLAYBOOK = site-docker.yml.sample @@ -204,6 +205,7 @@ commands= rhcs: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} repo_url={env:REPO_URL:} rhel7_repo_url={env:RHEL7_REPO_URL:}" --skip-tags "vagrant_setup" ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ + delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \ ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ @@ -231,6 +233,7 @@ commands= # handlers/idempotency test ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} \ --extra-vars "\ + delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \ ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \