From c8193bcaca876d598168ea7795ce48b652208249 Mon Sep 17 00:00:00 2001 From: rasmus Date: Sun, 3 Aug 2025 13:14:49 +0300 Subject: [PATCH] disable gather_facts globally, give up on facts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mingi 10 eri varianti proovisin ja variandid on: - üks host läheb 10s, gatherib kõike ja timeoutib zombie mountidega, ilmselgelt ei ole ainult cat /proc/cpuinfo - ei kogu mitte midagi võin siis juba käsitsi /proc/cpuinfo kallale minna, aga out of time ja pole hetkel ega mõne aasta jooksul oluline --- ansible.cfg | 5 +++-- proxmox/ceph.yaml | 1 - proxmox/general.yaml | 37 ++++++++++++++++++++++--------------- secrets.yaml | 1 - 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index 53877a3..bb6ac10 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -3,8 +3,9 @@ inventory = inventory.yaml nocows = 1 pattern = deprecation_warnings = False -fact_caching = jsonfile -fact_caching_connection = ~/.ansible/k-space-fact-cache +gathering = explicit +#fact_caching = jsonfile +#fact_caching_connection = ~/.ansible/k-space-fact-cache fact_caching_timeout = 7200 remote_user = root diff --git a/proxmox/ceph.yaml b/proxmox/ceph.yaml index 6578d4e..2213cfa 100644 --- a/proxmox/ceph.yaml +++ b/proxmox/ceph.yaml @@ -6,7 +6,6 @@ - pve91.proxmox.infra.k-space.ee - pve92.proxmox.infra.k-space.ee - pve93.proxmox.infra.k-space.ee - gather_facts: false serial: 1 # one host at a time tasks: diff --git a/proxmox/general.yaml b/proxmox/general.yaml index d97273c..e03c849 100644 --- a/proxmox/general.yaml +++ b/proxmox/general.yaml @@ -1,9 +1,7 @@ --- - name: PVE base configuration hosts: proxmox - gather_facts: false serial: 1 # one host at a time - tasks: - name: UI primary IP (/etc/hosts) tags: network @@ -44,19 +42,28 @@ # adding non-free-firmware component currently left manual, as it is hard to do reliably across upgrades + format will change with next major upg + not planning to add new nodes atm - - name: CPU microcode (Intel) - tags: dep - when: "'GenuineIntel' in ansible_processor" - apt: - state: latest - pkg: intel-microcode - - - name: CPU microcode (AMD) - tags: dep - when: "'AuthenticAMD' in ansible_processor" - apt: - state: latest - pkg: amd64-microcode + #TODO: Whatever you do, Ansible wants to collect _all_ facts all the time. +# - name: Collect processor facts +# ansible.builtin.setup: +# gather_subset: "!all,!min,processor" +# - name: Show Gathered Facts +# debug: +# msg: "{{ ansible_facts }}" +# +# +# - name: CPU microcode (Intel) +# tags: dep +# when: "'GenuineIntel' in ansible_processor" +# apt: +# state: latest +# pkg: intel-microcode +# +# - name: CPU microcode (AMD) +# tags: dep +# when: "'AuthenticAMD' in ansible_processor" +# apt: +# state: latest +# pkg: amd64-microcode - name: enable hardware watchdog tags: dep diff --git a/secrets.yaml b/secrets.yaml index 1b72fe3..53fd05b 100644 --- a/secrets.yaml +++ b/secrets.yaml @@ -1,7 +1,6 @@ --- - name: Checkout secrets hosts: localhost - gather_facts: false tasks: - name: Checkout secrets ansible.builtin.git: