Skip to content
Extraits de code Groupes Projets
Valider 8518b767 rédigé par Théo - Le Filament's avatar Théo - Le Filament
Parcourir les fichiers

fix: collect package facts only for servers in maintenance

parent c870aa69
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -319,13 +319,14 @@
changed_when: false
register: known_hosts_line
with_items: "{{ groups.backup_server }}"
when: inventory_hostname in groups.maintenance_contract
- name: Add backup servers in root known host
ansible.builtin.known_hosts:
hash_host: true
key: "{{ hostvars[item['item']].host_server_known_entry }}"
name: "[{{ hostvars[item['item']].ansible_host }}]:{{ default_sshd_port }}"
when: item.found is not defined
when: inventory_hostname in groups.maintenance_contract and item.found is not defined
with_items: "{{ known_hosts_line.results }}"
- name: Copy Installed Package Listing script on server
......@@ -335,6 +336,7 @@
owner: root
group: root
mode: '0700'
when: inventory_hostname in groups.maintenance_contract
- name: Disable e-mailing of crontab
ansible.builtin.cron:
......@@ -348,3 +350,4 @@
minute: "43"
hour: "0"
job: /root/collect_installed_packages_facts.sh
when: inventory_hostname in groups.maintenance_contract
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter