From 9741cf8c868f53cdceb4815e4ea5f0f4ce9079ef Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 29 Oct 2020 18:31:18 +0100 Subject: [PATCH] additional disks and tmpreaper are now part of the basic-system-setup role. --- .../centos-common/meta/main.yml | 1 - .../deb-ubuntu-common/meta/main.yml | 2 -- library/roles/data_disk/defaults/main.yml | 7 ----- library/roles/data_disk/tasks/main.yml | 25 ----------------- library/roles/tmpreaper/defaults/main.yml | 8 ------ library/roles/tmpreaper/tasks/main.yml | 27 ------------------- .../tmpreaper/templates/tmpreaper.conf.j2 | 7 ----- 7 files changed, 77 deletions(-) delete mode 100644 library/roles/data_disk/defaults/main.yml delete mode 100644 library/roles/data_disk/tasks/main.yml delete mode 100644 library/roles/tmpreaper/defaults/main.yml delete mode 100644 library/roles/tmpreaper/tasks/main.yml delete mode 100644 library/roles/tmpreaper/templates/tmpreaper.conf.j2 diff --git a/library/bootstrap-roles/centos-common/meta/main.yml b/library/bootstrap-roles/centos-common/meta/main.yml index dbfcb21..fe1dae3 100644 --- a/library/bootstrap-roles/centos-common/meta/main.yml +++ b/library/bootstrap-roles/centos-common/meta/main.yml @@ -2,7 +2,6 @@ dependencies: - role: '../../library/centos/roles/centos-bootstrap' - { role: '../../library/roles/cloud-init', when: ansible_product_name == "oVirt Node" } - - { role: '../../library/roles/data_disk', when: additional_disks is defined and additional_disks } - role: '../../library/roles/sshd_config' - role: '../../library/centos/roles/fail2ban' - src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-rsyslog.git diff --git a/library/bootstrap-roles/deb-ubuntu-common/meta/main.yml b/library/bootstrap-roles/deb-ubuntu-common/meta/main.yml index 8ea013a..eb80f88 100644 --- a/library/bootstrap-roles/deb-ubuntu-common/meta/main.yml +++ b/library/bootstrap-roles/deb-ubuntu-common/meta/main.yml @@ -1,10 +1,8 @@ --- dependencies: - role: '../../library/roles/ubuntu-deb-general' - - { role: '../../library/roles/data_disk', when: additional_disks is defined and additional_disks } - { role: '../../library/roles/cloud-init', when: ansible_product_name == "oVirt Node" } - role: '../../library/roles/sshd_config' - - role: '../../library/roles/tmpreaper' - src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-letsencrypt-acme-sh-client.git version: master name: letsencrypt-acme-sh-client diff --git a/library/roles/data_disk/defaults/main.yml b/library/roles/data_disk/defaults/main.yml deleted file mode 100644 index c3c30df..0000000 --- a/library/roles/data_disk/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# -# Define the following variables to manage additional disks and mount points -additional_disks: False -#disks_and_mountpoints_list: -# - { mountpoint: '/data', device: 'xvda3', fstype: 'xfs', opts: 'noatime', state: 'mounted', create_filesystem: True } - diff --git a/library/roles/data_disk/tasks/main.yml b/library/roles/data_disk/tasks/main.yml deleted file mode 100644 index a5519a0..0000000 --- a/library/roles/data_disk/tasks/main.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- block: - - name: Create a file system on the new disks - filesystem: dev=/dev/{{ item.device }} fstype={{ item.fstype }} force=no - with_items: '{{ disks_and_mountpoints_list | default([]) }}' - when: - - additional_disks - - item.create_filesystem - - - name: Install the NFS client utilities when we are going to mount a NFS file system - apt: pkg=nfs-common state=present update_cache=yes cache_valid_time=1800 - with_items: '{{ disks_and_mountpoints_list | default([]) }}' - when: item.fstype == 'nfs' - - - name: Install the NFS 4 acl tools when we are going to mount a NFS file system - apt: pkg=nfs4-acl-tools state=present update_cache=yes cache_valid_time=1800 - with_items: '{{ disks_and_mountpoints_list | default([]) }}' - when: item.fstype == 'nfs' - - - name: Manage the additional file systems - mount: name={{ item.mountpoint }} src={{ item.root_device | default('/dev') }}/{{ item.device }} fstype={{ item.fstype }} opts={{ item.opts }} state={{ item.state }} - with_items: '{{ disks_and_mountpoints_list | default([]) }}' - - when: additional_disks - tags: [ 'data_disk', 'mountpoint' ] diff --git a/library/roles/tmpreaper/defaults/main.yml b/library/roles/tmpreaper/defaults/main.yml deleted file mode 100644 index c6f4272..0000000 --- a/library/roles/tmpreaper/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -tmpreaper_install: False -tmpreaper_protect_extra: '' -tmpreaper_dirs: '/tmp/.' -tmpreaper_delay: '256' -tmpreaper_additional_options: '' -tmpreaper_time: '7d' - diff --git a/library/roles/tmpreaper/tasks/main.yml b/library/roles/tmpreaper/tasks/main.yml deleted file mode 100644 index 8c0d74a..0000000 --- a/library/roles/tmpreaper/tasks/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Install tmpreaper on Debian/Ubuntu - block: - - name: Install tmpreaper - apt: pkg=tmpreaper state=latest cache_valid_time=1800 - - - name: Install the tmpreaper configuration - template: src=tmpreaper.conf.j2 dest=/etc/tmpreaper.conf owner=root group=root mode=0444 - - when: - - tmpreaper_install | bool - - ansible_distribution_file_variety == "Debian" - tags: tmpreaper - -- name: Remove tmpreaper on Debian/Ubuntu - block: - - name: Remove the tmpreaper package - apt: pkg=tmpreaper state=absent - - - name: Remove the tmpreaper configuration - file: dest=/etc/tmpreaper.conf state=absent - - when: - - not tmpreaper_install | bool - - ansible_distribution_file_variety == "Debian" - tags: tmpreaper - diff --git a/library/roles/tmpreaper/templates/tmpreaper.conf.j2 b/library/roles/tmpreaper/templates/tmpreaper.conf.j2 deleted file mode 100644 index 82569e0..0000000 --- a/library/roles/tmpreaper/templates/tmpreaper.conf.j2 +++ /dev/null @@ -1,7 +0,0 @@ -# -TMPREAPER_TIME={{ tmpreaper_time }} -TMPREAPER_PROTECT_EXTRA='{{ tmpreaper_protect_extra }}' -TMPREAPER_DIRS='{{ tmpreaper_dirs }}' -TMPREAPER_DELAY='{{ tmpreaper_delay }}' -TMPREAPER_ADDITIONALOPTIONS='{{ tmpreaper_additional_options }}' -