summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2023-09-23 00:47:45 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2023-09-23 00:47:45 +0200
commit67792e19632666e5e595752d58b714808aa6d6f8 (patch)
tree56709da1f93e258bba38030a17a357836cae366c
parentfed47f9039e86f1a0b0b08588d5f5bccb08dac03 (diff)
downloadplaybooks-ansible-67792e19632666e5e595752d58b714808aa6d6f8.tar.gz
playbooks-ansible-67792e19632666e5e595752d58b714808aa6d6f8.tar.xz
playbooks-ansible-67792e19632666e5e595752d58b714808aa6d6f8.zip
Remove useless tasks about cleanup the system
-rw-r--r--roles/clients/tasks/config.yml39
-rw-r--r--roles/clients/tasks/cron.yml9
-rw-r--r--roles/clients/tasks/main.yml6
-rw-r--r--roles/clients/tasks/timers.yml33
-rw-r--r--roles/common/tasks/main.yml3
-rw-r--r--roles/common/tasks/repos.yml10
-rw-r--r--roles/common/tasks/yum.yml46
-rw-r--r--roles/diagnostics/tasks/aide.yml5
-rw-r--r--roles/diagnostics/tasks/cron.yml29
-rw-r--r--roles/diagnostics/tasks/main.yml6
-rw-r--r--roles/diagnostics/tasks/rkhunter.yml7
-rw-r--r--roles/diagnostics/tasks/selinux.yml10
12 files changed, 0 insertions, 203 deletions
diff --git a/roles/clients/tasks/config.yml b/roles/clients/tasks/config.yml
index 233fb60..f0afbb7 100644
--- a/roles/clients/tasks/config.yml
+++ b/roles/clients/tasks/config.yml
@@ -5,45 +5,6 @@
mode: 0644
notify: reload systemd
-- name: Suppression des unités systemd de monitoring
- file:
- path: "/etc/systemd/system/{{ item[0] }}-{{ item[1] }}.service"
- state: absent
- loop: "{{ ['arp-poisoning', 'arp-watcher'] |product(['eno1', 'enp8s0'])|list }}"
- notify: reload systemd
-
-- name: Suppression des unités systemd de capture
- file:
- path: "/etc/systemd/system/passerelle-dump-{{ item }}.service"
- state: absent
- loop:
- - eno1
- - enp8s0
- - virbr0
- notify: reload systemd
-
-- name: Suppression des unités systemd des sites
- file:
- path: "/etc/systemd/system/{{ item[0] }}-{{ item[1] }}.service"
- state: absent
- loop: "{{ ['apache', 'mariadb', 'memcached', 'php-fpm'] |product(['casper-site', 'jays-site'])|list }}"
- notify: reload systemd
-
-- name: Suppression des unités systemd pour dev
- file:
- path: "/etc/systemd/system/{{ item[0] }}-{{ item[1] }}.service"
- state: absent
- loop: "{{ ['apache-dev', 'php-fpm'] |product(['56', '70', '71', '72', '73', '74'])|list }}"
-
-- name: Suppression des variables credentials
- file:
- path: "/etc/mariadb-{{ item }}.env"
- state: absent
- loop:
- - casper-site
- - jays-site
- notify: reload systemd
-
- name: Configuration lecteur NFC
copy:
src: modprobe.d_pn533-blacklist.conf
diff --git a/roles/clients/tasks/cron.yml b/roles/clients/tasks/cron.yml
deleted file mode 100644
index 0f26f65..0000000
--- a/roles/clients/tasks/cron.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-- name: Backup des machines virtuelles
- file:
- path: /etc/cron.daily/nbackvirt-machines.sh
- state: absent
-
-- name: Restauration du snapshot de la machine virtuelle
- file:
- path: /etc/cron.daily/reroll-virtmachine.sh
- state: absent
diff --git a/roles/clients/tasks/main.yml b/roles/clients/tasks/main.yml
index ea6cf0a..1ccca49 100644
--- a/roles/clients/tasks/main.yml
+++ b/roles/clients/tasks/main.yml
@@ -25,12 +25,6 @@
- name: Configuration stunnel pour nfs
import_tasks: stunnel.yml
-- name: Configuration démon Cron
- import_tasks: cron.yml
-
-- name: Configuration des timers systemd
- import_tasks: timers.yml
-
- name: Installation des scripts de base
import_tasks: binutils.yml
diff --git a/roles/clients/tasks/timers.yml b/roles/clients/tasks/timers.yml
deleted file mode 100644
index 93625c0..0000000
--- a/roles/clients/tasks/timers.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-- name: Backup des machines virtuelles
- file:
- path: /usr/local/bin/backvirt-machines.sh
- state: absent
-
-- name: Unité systemd pour le backup vm
- file:
- path: /etc/systemd/system/backvirt-machines.service
- state: absent
- notify: reload systemd
-
-- name: Timer systemd pour le backup vm
- file:
- path: /etc/systemd/system/backvirt-machines.timer
- state: absent
- notify: reload systemd
-
-- name: Restauration du snapshot de la machine virtuelle
- file:
- path: /usr/local/bin/reroll-virtmachine.sh
- state: absent
-
-- name: Unité systemd pour le restore vm
- file:
- path: /etc/systemd/system/reroll-virtmachine.service
- state: absent
- notify: reload systemd
-
-- name: Timer systemd pour le restore vm
- file:
- path: /etc/systemd/system/reroll-virtmachine.timer
- state: absent
- notify: reload systemd
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 534b190..dc1846c 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -29,9 +29,6 @@
- name: Gestion des Autorités de Certification
import_tasks: ca.yml
-- name: Configuration Yum
- import_tasks: yum.yml
-
- name: Configuration DNF
import_tasks: dnf.yml
diff --git a/roles/common/tasks/repos.yml b/roles/common/tasks/repos.yml
index 4c25ff0..d61303b 100644
--- a/roles/common/tasks/repos.yml
+++ b/roles/common/tasks/repos.yml
@@ -1,13 +1,3 @@
-- name: Suppression depots Fantom
- file:
- path: "/etc/yum.repos.d/{{ item }}"
- state: absent
- loop:
- - updates-fantom.repo
- - updates-fantom-hidden.repo
- - fedora-fantom.repo
- - fedora-fantom-hidden.repo
-
- name: Installation du dépôt EPEL pour Centos
package:
name: epel-release
diff --git a/roles/common/tasks/yum.yml b/roles/common/tasks/yum.yml
deleted file mode 100644
index ad5b200..0000000
--- a/roles/common/tasks/yum.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-- name: Affichage historique
- ini_file:
- path: /etc/yum.conf
- mode: 0644
- section: main
- option: history_list_view
- value: cmds
- when: ansible_pkg_mgr == "yum"
-
-- name: Clean requirements on remove
- ini_file:
- path: /etc/yum.conf
- mode: 0644
- section: main
- option: clean_requirements_on_remove
- value: "1"
- when: ansible_pkg_mgr == "yum"
-
-- name: Désactivation delta rpm
- ini_file:
- path: /etc/yum.conf
- mode: 0644
- section: main
- option: deltarpm
- value: "0"
- when: ansible_pkg_mgr == "yum"
-
-- name: Nombre mini de noyaux installés
- ini_file:
- path: /etc/yum.conf
- mode: 0644
- section: main
- option: installonly_limit
- value: "{{ minkernel }}"
- when: ansible_virtualization_role is defined and ansible_virtualization_role == "guest"
- and ansible_pkg_mgr == "yum"
-
-- name: Nombre maxi de noyaux installés
- ini_file:
- path: /etc/yum.conf
- mode: 0644
- section: main
- option: installonly_limit
- value: "{{ maxkernel }}"
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
- and ansible_pkg_mgr == "yum"
diff --git a/roles/diagnostics/tasks/aide.yml b/roles/diagnostics/tasks/aide.yml
index 2255110..e4e9aa9 100644
--- a/roles/diagnostics/tasks/aide.yml
+++ b/roles/diagnostics/tasks/aide.yml
@@ -3,11 +3,6 @@
name: aide
state: present
-- name: Suppresion du crontask
- file:
- path: /etc/cron.daily/z-aidereport.sh
- state: absent
-
- name: Activation du HIDS AIDE
copy:
src: aidereport.sh
diff --git a/roles/diagnostics/tasks/cron.yml b/roles/diagnostics/tasks/cron.yml
deleted file mode 100644
index 5caaacd..0000000
--- a/roles/diagnostics/tasks/cron.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-- name: Rapport disques durs
- file:
- path: /etc/cron.daily/diskreport.sh
- state: absent
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
-
-- name: Rapport RPM Verify monthly
- file:
- path: /etc/cron.monthly/rpmreport.sh
- state: absent
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
-
-- name: Rapport RPM Verify daily
- file:
- path: /etc/cron.daily/rpmreport.sh
- state: absent
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
-
-- name: Tests disques durs
- file:
- path: /etc/cron.weekly/diskcheck.sh
- state: absent
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
-
-- name: Rapport d'uptime des machines physiques
- file:
- path: /etc/cron.weekly/a-uptimereport.sh
- state: absent
- when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"
diff --git a/roles/diagnostics/tasks/main.yml b/roles/diagnostics/tasks/main.yml
index e6de2d3..1ebbf74 100644
--- a/roles/diagnostics/tasks/main.yml
+++ b/roles/diagnostics/tasks/main.yml
@@ -1,6 +1,3 @@
-- name: Configuration démon Cron
- import_tasks: cron.yml
-
- name: Désinstallation de cockpit
import_tasks: cockpit.yml
@@ -19,9 +16,6 @@
- name: Installation du HIDS AIDE
import_tasks: aide.yml
-- name: Installation de rkhunter
- import_tasks: rkhunter.yml
-
- name: Mise à jour des db des HIDS
import_tasks: hidsdb.yml
diff --git a/roles/diagnostics/tasks/rkhunter.yml b/roles/diagnostics/tasks/rkhunter.yml
deleted file mode 100644
index 20281ff..0000000
--- a/roles/diagnostics/tasks/rkhunter.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: Désinstallation du HIDS rkhunter
- package:
- name: "{{ item }}"
- state: absent
- loop:
- - rkhunter
- - unhide
diff --git a/roles/diagnostics/tasks/selinux.yml b/roles/diagnostics/tasks/selinux.yml
index 2c8db82..4af621f 100644
--- a/roles/diagnostics/tasks/selinux.yml
+++ b/roles/diagnostics/tasks/selinux.yml
@@ -1,8 +1,3 @@
-- name: Suppresion du crontask
- file:
- path: /etc/cron.daily/eaureport.sh
- state: absent
-
- name: Rapport SELinux
copy:
src: aureport.sh
@@ -26,11 +21,6 @@
notify: reload systemd
when: ansible_selinux.status != "disabled"
-- name: Suppresion du crontask
- file:
- path: /etc/cron.monthly/selinuxresto.sh
- state: absent
-
- name: Relabel système de fichier
copy:
src: selinuxresto.sh