From 3dfd06cbdb11337c015089e0d87fbe73bec500ab Mon Sep 17 00:00:00 2001 From: Salt Date: Tue, 15 Feb 2022 15:19:34 -0600 Subject: [PATCH] Disable a ton of fact gathering -- I anticipate this will fail at CI --- playbooks/all_scanner.yml | 1 + playbooks/cleanup.yml | 5 +---- playbooks/device_roles_bastion.yml | 1 + playbooks/device_roles_game.yml | 1 + playbooks/home_app.yml | 3 +++ playbooks/home_automation.yml | 1 + playbooks/home_game.yml | 3 +++ playbooks/home_media.yml | 1 + playbooks/manufacturers_raspi.yml | 1 + playbooks/platforms_proxmox-ve-7.yml | 1 + playbooks/platforms_ub2004.yml | 1 + playbooks/platforms_ub2110.yml | 1 + playbooks/prod_com.yml | 1 + playbooks/prod_game.yml | 1 + playbooks/prod_web.yml | 3 +++ playbooks/tags_ansible-pull.yml | 2 ++ playbooks/tags_ansible.yml | 1 + playbooks/tags_autoreboot.yml | 1 + playbooks/tags_docker-prune.yml | 1 + playbooks/tags_nagios.yml | 2 ++ playbooks/tags_snmp.yml | 2 ++ roles/ansible-pull/tasks/main.yml | 1 - roles/ansible/README.md | 3 --- roles/ansible/tasks/main.yml | 1 - 24 files changed, 30 insertions(+), 9 deletions(-) delete mode 100644 roles/ansible/README.md diff --git a/playbooks/all_scanner.yml b/playbooks/all_scanner.yml index 1c90afe..66d90eb 100755 --- a/playbooks/all_scanner.yml +++ b/playbooks/all_scanner.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: all + gather_facts: no tasks: - name: assure scanner user user: name=scanner password="!" state=present diff --git a/playbooks/cleanup.yml b/playbooks/cleanup.yml index 086c01c..a477bfc 100755 --- a/playbooks/cleanup.yml +++ b/playbooks/cleanup.yml @@ -1,12 +1,9 @@ #!/usr/bin/env ansible-playbook # vim:ft=ansible: --- -# Preambulatory system configuration - hosts: all + gather_facts: no tasks: - - name: collect service facts - service_facts: - tags: [ always ] - name: touch ansible timestamp file file: path=/var/lib/ansible-last-run state=touch mode='0644' changed_when: no diff --git a/playbooks/device_roles_bastion.yml b/playbooks/device_roles_bastion.yml index 15eebf3..d228913 100755 --- a/playbooks/device_roles_bastion.yml +++ b/playbooks/device_roles_bastion.yml @@ -3,6 +3,7 @@ --- # Home desktops - hosts: device_roles_bastion + gather_facts: no roles: - role: backup vars: diff --git a/playbooks/device_roles_game.yml b/playbooks/device_roles_game.yml index 10480c2..ffc3fab 100755 --- a/playbooks/device_roles_game.yml +++ b/playbooks/device_roles_game.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: device_roles_game + gather_facts: no roles: - role: backup vars: diff --git a/playbooks/home_app.yml b/playbooks/home_app.yml index 13e1cdc..5dd6fc7 100755 --- a/playbooks/home_app.yml +++ b/playbooks/home_app.yml @@ -3,6 +3,7 @@ # Webservers --- - hosts: vm-bot-1.home.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started @@ -22,6 +23,7 @@ - /data tags: [ backup ] - hosts: vm-scan-1.home.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started @@ -44,6 +46,7 @@ - /data tags: [ backup ] - hosts: vm-syncthing-1.home.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started diff --git a/playbooks/home_automation.yml b/playbooks/home_automation.yml index 7c4f748..0ef504a 100755 --- a/playbooks/home_automation.yml +++ b/playbooks/home_automation.yml @@ -3,6 +3,7 @@ --- # Home media storage Pi - hosts: pi-homeauto-1.home.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started diff --git a/playbooks/home_game.yml b/playbooks/home_game.yml index b10f63f..3a0a4fb 100755 --- a/playbooks/home_game.yml +++ b/playbooks/home_game.yml @@ -3,6 +3,7 @@ # Game servers --- - hosts: vm-minecraft-1.home.mgmt.desu.ltd + gather_facts: no pre_tasks: - name: include tasks for gameservers include_tasks: tasks/game/{{ item }} @@ -21,6 +22,7 @@ - /data/minecraft/botaniapack2-creative/backups tags: [ backup ] - hosts: vm-minecraft-2.home.mgmt.desu.ltd + gather_facts: no pre_tasks: - name: include tasks for gameservers include_tasks: tasks/game/{{ item }} @@ -37,6 +39,7 @@ - /data/minecraft/enigmatica6/backups tags: [ backup ] - hosts: vm-terraria-1.home.mgmt.desu.ltd + gather_facts: no pre_tasks: - name: include tasks for gameservers include_tasks: tasks/game/{{ item }} diff --git a/playbooks/home_media.yml b/playbooks/home_media.yml index e8a1626..e196a44 100755 --- a/playbooks/home_media.yml +++ b/playbooks/home_media.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: vm-media-1.home.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started diff --git a/playbooks/manufacturers_raspi.yml b/playbooks/manufacturers_raspi.yml index 9866c0a..23def5a 100755 --- a/playbooks/manufacturers_raspi.yml +++ b/playbooks/manufacturers_raspi.yml @@ -3,6 +3,7 @@ --- # General configuration - hosts: manufacturers_raspi + gather_facts: no tasks: - name: install raspi packages apt: diff --git a/playbooks/platforms_proxmox-ve-7.yml b/playbooks/platforms_proxmox-ve-7.yml index 3166cf0..9ceec87 100755 --- a/playbooks/platforms_proxmox-ve-7.yml +++ b/playbooks/platforms_proxmox-ve-7.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: platforms_proxmox-ve-7 + gather_facts: no roles: - role: backup vars: diff --git a/playbooks/platforms_ub2004.yml b/playbooks/platforms_ub2004.yml index 39ebbc8..756f8b9 100755 --- a/playbooks/platforms_ub2004.yml +++ b/playbooks/platforms_ub2004.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: platforms_ub2004 + gather_facts: no roles: - role: motd vars: diff --git a/playbooks/platforms_ub2110.yml b/playbooks/platforms_ub2110.yml index 79e3e34..b5f5ad8 100755 --- a/playbooks/platforms_ub2110.yml +++ b/playbooks/platforms_ub2110.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: platforms_ub2110 + gather_facts: no roles: - role: motd vars: diff --git a/playbooks/prod_com.yml b/playbooks/prod_com.yml index 33923f5..01fe8b5 100755 --- a/playbooks/prod_com.yml +++ b/playbooks/prod_com.yml @@ -3,6 +3,7 @@ # Webservers --- - hosts: com1.dallas.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started diff --git a/playbooks/prod_game.yml b/playbooks/prod_game.yml index 7fdb6af..92f9a29 100755 --- a/playbooks/prod_game.yml +++ b/playbooks/prod_game.yml @@ -3,6 +3,7 @@ # Game servers --- - hosts: vm-game-1.dallas.mgmt.desu.ltd + gather_facts: no tasks: - name: include tasks for gameservers include_tasks: tasks/game/{{ item }} diff --git a/playbooks/prod_web.yml b/playbooks/prod_web.yml index 3b44aaa..2b05747 100755 --- a/playbooks/prod_web.yml +++ b/playbooks/prod_web.yml @@ -3,6 +3,7 @@ # Webservers --- - hosts: web1.dallas.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started @@ -78,6 +79,7 @@ proxy_pass: http://srv:80 tags: [ web, docker, ingress ] - hosts: web2.dallas.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started @@ -133,6 +135,7 @@ } tags: [ web, docker, ingress ] - hosts: web3.dallas.mgmt.desu.ltd + gather_facts: no module_defaults: docker_container: state: started diff --git a/playbooks/tags_ansible-pull.yml b/playbooks/tags_ansible-pull.yml index a47b1f5..4cd21dc 100755 --- a/playbooks/tags_ansible-pull.yml +++ b/playbooks/tags_ansible-pull.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_ansible-pull + gather_facts: no roles: - role: ansible-pull vars: @@ -15,6 +16,7 @@ dest: /etc/ansible tags: [ ansible ] - hosts: all + gather_facts: no tasks: - name: disable ansible-pull when not tagged systemd: name={{ item }} state=stopped enabled=no diff --git a/playbooks/tags_ansible.yml b/playbooks/tags_ansible.yml index 800df61..fdf222f 100755 --- a/playbooks/tags_ansible.yml +++ b/playbooks/tags_ansible.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_ansible + gather_facts: no roles: - role: ansible tags: [ ansible ] diff --git a/playbooks/tags_autoreboot.yml b/playbooks/tags_autoreboot.yml index 4f051ab..5ff7363 100755 --- a/playbooks/tags_autoreboot.yml +++ b/playbooks/tags_autoreboot.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_autoreboot + gather_facts: no module_defaults: nagios: author: Ansible diff --git a/playbooks/tags_docker-prune.yml b/playbooks/tags_docker-prune.yml index 82a09ea..337ae48 100755 --- a/playbooks/tags_docker-prune.yml +++ b/playbooks/tags_docker-prune.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_docker-prune + gather_facts: no tasks: - name: prune old docker assets community.docker.docker_prune: diff --git a/playbooks/tags_nagios.yml b/playbooks/tags_nagios.yml index 2816fee..52907d5 100755 --- a/playbooks/tags_nagios.yml +++ b/playbooks/tags_nagios.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_nagios + gather_facts: no roles: - role: git vars: @@ -35,6 +36,7 @@ - /usr/local/bin/monitoring-scripts/check_temp tags: [ nagios, sudo ] - hosts: all + gather_facts: no tasks: - name: disable nagios user when not tagged user: name=nagios-checker state=absent remove=yes diff --git a/playbooks/tags_snmp.yml b/playbooks/tags_snmp.yml index 0eb0b27..2f86e82 100755 --- a/playbooks/tags_snmp.yml +++ b/playbooks/tags_snmp.yml @@ -2,6 +2,7 @@ # vim:ft=ansible: --- - hosts: tags_snmp + gather_facts: no roles: - role: oefenweb.snmpd vars: @@ -20,6 +21,7 @@ snmpd_disks_include_all_threshold_minpercent: "10%" tags: [ snmp ] - hosts: all + gather_facts: no tasks: - name: disable snmpd when not tagged systemd: name={{ item }} state=stopped enabled=no diff --git a/roles/ansible-pull/tasks/main.yml b/roles/ansible-pull/tasks/main.yml index 5284e00..98d1c21 100644 --- a/roles/ansible-pull/tasks/main.yml +++ b/roles/ansible-pull/tasks/main.yml @@ -6,7 +6,6 @@ become_user: ansible - name: install ansible pip: name=ansible<5,ansible-lint state=latest - when: ansible_os_family != "Gentoo" - name: configure systemd service template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service mode=0644 - name: configure systemd timer diff --git a/roles/ansible/README.md b/roles/ansible/README.md deleted file mode 100644 index e87967d..0000000 --- a/roles/ansible/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ansible-pull - -This role configures and enables a period `ansible-pull` task through systemd, allowing for machines to ensure proper configuration periodically and of their own volition. diff --git a/roles/ansible/tasks/main.yml b/roles/ansible/tasks/main.yml index 4248375..1490f8a 100644 --- a/roles/ansible/tasks/main.yml +++ b/roles/ansible/tasks/main.yml @@ -2,4 +2,3 @@ # vim:ft=ansible: - name: install ansible pip: name=ansible<5,ansible-lint state=latest - when: ansible_os_family != "Gentoo"