]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
site-docker: ability to disable fact sharing
authorSébastien Han <seb@redhat.com>
Tue, 19 Dec 2017 14:10:05 +0000 (15:10 +0100)
committerSébastien Han <seb@redhat.com>
Tue, 19 Dec 2017 16:22:11 +0000 (17:22 +0100)
When deploying with Ansible at large scale, the delegate_facts method
consumes a lot of memory on the host that is running Ansible. This can
cause various issues like memory exhaustion on that machine.
You can now run Ansible with "-e delegate_facts_host=False" to disable
the fact sharing.

Signed-off-by: Sébastien Han <seb@redhat.com>
site-docker.yml.sample

index 548ea20a14e71d010cc2cc988908672466ca42fa..7ac1dfe22514f3138306c460b01297ad0f1f3abc 100644 (file)
   - clients
   - iscsigws
   - mgrs
+
   gather_facts: false
   become: True
+
+  vars:
+    delegate_facts_host: True
+
   pre_tasks:
+    - 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: check if it is atomic host
       stat: