diff --git a/validations_common/roles/undercloud_cpu/README.md b/validations_common/roles/check_cpu/README.md similarity index 100% rename from validations_common/roles/undercloud_cpu/README.md rename to validations_common/roles/check_cpu/README.md diff --git a/validations_common/roles/check_cpu/defaults/main.yml b/validations_common/roles/check_cpu/defaults/main.yml new file mode 100644 index 0000000..df8f7bd --- /dev/null +++ b/validations_common/roles/check_cpu/defaults/main.yml @@ -0,0 +1,2 @@ +--- +minimal_cpu_count: 8 diff --git a/validations_common/roles/undercloud_cpu/molecule/default/Dockerfile.j2 b/validations_common/roles/check_cpu/molecule/default/Dockerfile.j2 similarity index 100% rename from validations_common/roles/undercloud_cpu/molecule/default/Dockerfile.j2 rename to validations_common/roles/check_cpu/molecule/default/Dockerfile.j2 diff --git a/validations_common/roles/undercloud_cpu/molecule/default/molecule.yml b/validations_common/roles/check_cpu/molecule/default/molecule.yml similarity index 100% rename from validations_common/roles/undercloud_cpu/molecule/default/molecule.yml rename to validations_common/roles/check_cpu/molecule/default/molecule.yml diff --git a/validations_common/roles/undercloud_cpu/molecule/default/playbook.yml b/validations_common/roles/check_cpu/molecule/default/playbook.yml similarity index 87% rename from validations_common/roles/undercloud_cpu/molecule/default/playbook.yml rename to validations_common/roles/check_cpu/molecule/default/playbook.yml index f6802bf..1e491d8 100644 --- a/validations_common/roles/undercloud_cpu/molecule/default/playbook.yml +++ b/validations_common/roles/check_cpu/molecule/default/playbook.yml @@ -19,12 +19,12 @@ hosts: all vars: - min_undercloud_cpu_count: 100 + minimal_cpu_count: 100 tasks: - block: - include_role: - name: undercloud_cpu + name: check_cpu rescue: - name: Clear host errors meta: clear_host_errors @@ -38,5 +38,5 @@ - name: Fail the test fail: msg: | - The undercloud_cpu role should have detected that there is not + The check_cpu role should have detected that there is not enough CPU diff --git a/validations_common/roles/check_cpu/tasks/main.yml b/validations_common/roles/check_cpu/tasks/main.yml new file mode 100644 index 0000000..f10defc --- /dev/null +++ b/validations_common/roles/check_cpu/tasks/main.yml @@ -0,0 +1,7 @@ +--- +- name: Verify the number of CPU cores + fail: + msg: >- + There are {{ ansible_processor_vcpus }} cores in the system, + but there should be at least {{ minimal_cpu_count }} + failed_when: "ansible_processor_vcpus|int < minimal_cpu_count|int" diff --git a/validations_common/roles/undercloud_disk_space/defaults/main.yml b/validations_common/roles/check_disk_space/defaults/main.yml similarity index 100% rename from validations_common/roles/undercloud_disk_space/defaults/main.yml rename to validations_common/roles/check_disk_space/defaults/main.yml diff --git a/validations_common/roles/undercloud_disk_space/molecule/default/Dockerfile.j2 b/validations_common/roles/check_disk_space/molecule/default/Dockerfile.j2 similarity index 100% rename from validations_common/roles/undercloud_disk_space/molecule/default/Dockerfile.j2 rename to validations_common/roles/check_disk_space/molecule/default/Dockerfile.j2 diff --git a/validations_common/roles/undercloud_disk_space/molecule/default/molecule.yml b/validations_common/roles/check_disk_space/molecule/default/molecule.yml similarity index 100% rename from validations_common/roles/undercloud_disk_space/molecule/default/molecule.yml rename to validations_common/roles/check_disk_space/molecule/default/molecule.yml diff --git a/validations_common/roles/undercloud_disk_space/molecule/default/playbook.yml b/validations_common/roles/check_disk_space/molecule/default/playbook.yml similarity index 96% rename from validations_common/roles/undercloud_disk_space/molecule/default/playbook.yml rename to validations_common/roles/check_disk_space/molecule/default/playbook.yml index 31826ae..eb37855 100644 --- a/validations_common/roles/undercloud_disk_space/molecule/default/playbook.yml +++ b/validations_common/roles/check_disk_space/molecule/default/playbook.yml @@ -27,7 +27,7 @@ tasks: - block: - include_role: - name: undercloud_disk_space + name: check_disk_space rescue: - name: Clear host errors meta: clear_host_errors diff --git a/validations_common/roles/undercloud_disk_space/tasks/main.yml b/validations_common/roles/check_disk_space/tasks/main.yml similarity index 100% rename from validations_common/roles/undercloud_disk_space/tasks/main.yml rename to validations_common/roles/check_disk_space/tasks/main.yml diff --git a/validations_common/roles/undercloud_ram/README.md b/validations_common/roles/check_ram/README.md similarity index 100% rename from validations_common/roles/undercloud_ram/README.md rename to validations_common/roles/check_ram/README.md diff --git a/validations_common/roles/check_ram/defaults/main.yml b/validations_common/roles/check_ram/defaults/main.yml new file mode 100644 index 0000000..4a593c8 --- /dev/null +++ b/validations_common/roles/check_ram/defaults/main.yml @@ -0,0 +1,2 @@ +--- +minimal_ram_gb: 24 diff --git a/validations_common/roles/undercloud_ram/molecule/default/Dockerfile.j2 b/validations_common/roles/check_ram/molecule/default/Dockerfile.j2 similarity index 100% rename from validations_common/roles/undercloud_ram/molecule/default/Dockerfile.j2 rename to validations_common/roles/check_ram/molecule/default/Dockerfile.j2 diff --git a/validations_common/roles/undercloud_ram/molecule/default/molecule.yml b/validations_common/roles/check_ram/molecule/default/molecule.yml similarity index 100% rename from validations_common/roles/undercloud_ram/molecule/default/molecule.yml rename to validations_common/roles/check_ram/molecule/default/molecule.yml diff --git a/validations_common/roles/undercloud_ram/molecule/default/playbook.yml b/validations_common/roles/check_ram/molecule/default/playbook.yml similarity index 87% rename from validations_common/roles/undercloud_ram/molecule/default/playbook.yml rename to validations_common/roles/check_ram/molecule/default/playbook.yml index 22e52b9..76e6795 100644 --- a/validations_common/roles/undercloud_ram/molecule/default/playbook.yml +++ b/validations_common/roles/check_ram/molecule/default/playbook.yml @@ -19,12 +19,12 @@ hosts: all vars: - min_undercloud_ram_gb: 1000000 + minimal_ram_gb: 1000000 tasks: - block: - include_role: - name: undercloud_ram + name: check_ram rescue: - name: Clear host errors meta: clear_host_errors @@ -38,5 +38,5 @@ - name: Fail the test fail: msg: | - The undercloud_ram role should have detected that there is not + The check_ram role should have detected that there is not enough RAM diff --git a/validations_common/roles/check_ram/tasks/main.yml b/validations_common/roles/check_ram/tasks/main.yml new file mode 100644 index 0000000..1f17644 --- /dev/null +++ b/validations_common/roles/check_ram/tasks/main.yml @@ -0,0 +1,9 @@ +--- +- name: Verify the RAM requirements + fail: + msg: >- + The RAM on the system is {{ ansible_memtotal_mb }} MB, + the minimal recommended value is + {{ minimal_ram_gb|int * 1024 }} MB. + # NOTE(shadower): converting GB to MB + failed_when: "(ansible_memtotal_mb) < minimal_ram_gb|int * 1024" diff --git a/validations_common/roles/undercloud_selinux_mode/molecule/default/Dockerfile.j2 b/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile.j2 similarity index 100% rename from validations_common/roles/undercloud_selinux_mode/molecule/default/Dockerfile.j2 rename to validations_common/roles/check_selinux_mode/molecule/default/Dockerfile.j2 diff --git a/validations_common/roles/undercloud_selinux_mode/molecule/default/molecule.yml b/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml similarity index 94% rename from validations_common/roles/undercloud_selinux_mode/molecule/default/molecule.yml rename to validations_common/roles/check_selinux_mode/molecule/default/molecule.yml index f87e178..6677e1a 100644 --- a/validations_common/roles/undercloud_selinux_mode/molecule/default/molecule.yml +++ b/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml @@ -27,7 +27,6 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" scenario: test_sequence: diff --git a/validations_common/roles/undercloud_selinux_mode/molecule/default/playbook.yml b/validations_common/roles/check_selinux_mode/molecule/default/playbook.yml similarity index 100% rename from validations_common/roles/undercloud_selinux_mode/molecule/default/playbook.yml rename to validations_common/roles/check_selinux_mode/molecule/default/playbook.yml diff --git a/validations_common/roles/undercloud_selinux_mode/tasks/main.yml b/validations_common/roles/check_selinux_mode/tasks/main.yml similarity index 100% rename from validations_common/roles/undercloud_selinux_mode/tasks/main.yml rename to validations_common/roles/check_selinux_mode/tasks/main.yml diff --git a/validations_common/roles/undercloud_service_status/defaults/main.yml b/validations_common/roles/check_service_status/defaults/main.yml similarity index 87% rename from validations_common/roles/undercloud_service_status/defaults/main.yml rename to validations_common/roles/check_service_status/defaults/main.yml index e9e29ba..837e33c 100644 --- a/validations_common/roles/undercloud_service_status/defaults/main.yml +++ b/validations_common/roles/check_service_status/defaults/main.yml @@ -1,5 +1,5 @@ --- -undercloud_service_list: +check_service_list: - tripleo_nova_compute - tripleo_heat_engine - tripleo_ironic_conductor diff --git a/validations_common/roles/undercloud_service_status/tasks/main.yml b/validations_common/roles/check_service_status/tasks/main.yml similarity index 92% rename from validations_common/roles/undercloud_service_status/tasks/main.yml rename to validations_common/roles/check_service_status/tasks/main.yml index 8291e81..cb48cd4 100644 --- a/validations_common/roles/undercloud_service_status/tasks/main.yml +++ b/validations_common/roles/check_service_status/tasks/main.yml @@ -2,7 +2,7 @@ - name: Check Services are running command: "/usr/bin/systemctl show {{ item }} --property ActiveState" become: true - with_items: "{{ undercloud_service_list }}" + with_items: "{{ check_service_list }}" register: "check_services" changed_when: false ignore_errors: true diff --git a/validations_common/roles/undercloud_cpu/defaults/main.yml b/validations_common/roles/undercloud_cpu/defaults/main.yml deleted file mode 100644 index 5a15292..0000000 --- a/validations_common/roles/undercloud_cpu/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- - -min_undercloud_cpu_count: 8 diff --git a/validations_common/roles/undercloud_cpu/tasks/main.yml b/validations_common/roles/undercloud_cpu/tasks/main.yml deleted file mode 100644 index eeb0031..0000000 --- a/validations_common/roles/undercloud_cpu/tasks/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Verify the number of CPU cores - fail: - msg: >- - There are {{ ansible_processor_vcpus }} cores in the system, - but there should be at least {{ min_undercloud_cpu_count }} - failed_when: "ansible_processor_vcpus|int < min_undercloud_cpu_count|int" diff --git a/validations_common/roles/undercloud_cpu/vars/main.yaml b/validations_common/roles/undercloud_cpu/vars/main.yaml deleted file mode 100644 index 2766e82..0000000 --- a/validations_common/roles/undercloud_cpu/vars/main.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -metadata: - name: Verify undercloud fits the CPU core requirements - description: > - Make sure that the undercloud has enough CPU cores. - - https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Undercloud_Requirements.html - groups: - - prep - - pre-introspection diff --git a/validations_common/roles/undercloud_disk_space/README.md b/validations_common/roles/undercloud_disk_space/README.md deleted file mode 100644 index 73bf492..0000000 --- a/validations_common/roles/undercloud_disk_space/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Undercloud-disk-space -===================== - -An Ansible role to verify if the Undercloud fits the disk space requirements. - -Requirements ------------- - -This role could be used before or/and after the Undercloud installation. - -Role Variables --------------- - -- Volumes: a dictionary of mount points and their minimum sizes - -Dependencies ------------- - -No Dependencies - -Example Playbook ----------------- - - - hosts: servers - roles: - - { role: undercloud-disk-space} - -License -------- - -Apache - -Author Information ------------------- - -Red Hat TripleO Validation Team diff --git a/validations_common/roles/undercloud_disk_space/vars/main.yaml b/validations_common/roles/undercloud_disk_space/vars/main.yaml deleted file mode 100644 index 69b5444..0000000 --- a/validations_common/roles/undercloud_disk_space/vars/main.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -metadata: - name: Verify undercloud fits the disk space requirements - description: > - Make sure that the root partition on the undercloud node has enough - free space. - - http://tripleo.org/install/environments/baremetal.html#minimum-system-requirements - groups: - - prep - - pre-introspection diff --git a/validations_common/roles/undercloud_ram/defaults/main.yml b/validations_common/roles/undercloud_ram/defaults/main.yml deleted file mode 100644 index c9dbb34..0000000 --- a/validations_common/roles/undercloud_ram/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- - -min_undercloud_ram_gb: 24 diff --git a/validations_common/roles/undercloud_ram/tasks/main.yml b/validations_common/roles/undercloud_ram/tasks/main.yml deleted file mode 100644 index bd2c4e9..0000000 --- a/validations_common/roles/undercloud_ram/tasks/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Verify the RAM requirements - fail: - msg: >- - The RAM on the undercloud node is {{ ansible_memtotal_mb }} MB, - the minimal recommended value is - {{ min_undercloud_ram_gb|int * 1024 }} MB. - # NOTE(shadower): converting GB to MB - failed_when: "(ansible_memtotal_mb) < min_undercloud_ram_gb|int * 1024" diff --git a/validations_common/roles/undercloud_ram/vars/main.yaml b/validations_common/roles/undercloud_ram/vars/main.yaml deleted file mode 100644 index 3bde5ed..0000000 --- a/validations_common/roles/undercloud_ram/vars/main.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -metadata: - name: Verify the undercloud fits the RAM requirements - description: > - Verify that the undercloud has enough RAM. - - https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/14/html/director_installation_and_usage/planning-your-undercloud#determining-environment-scale - groups: - - prep - - pre-introspection - - pre-upgrade diff --git a/validations_common/roles/undercloud_selinux_mode/README.md b/validations_common/roles/undercloud_selinux_mode/README.md deleted file mode 100644 index eee51ef..0000000 --- a/validations_common/roles/undercloud_selinux_mode/README.md +++ /dev/null @@ -1,37 +0,0 @@ -Undercloud-selinux-mode -======================= - -An Ansible role to check the Undercloud SELinux Enforcing mode - - -Requirements ------------- - -This role could be used before or/and after the Undercloud installation - -Role Variables --------------- - -None - -Dependencies ------------- - -No dependencies. - -Example Playbook ----------------- - - - hosts: undercloud - roles: - - { role: undercloud-selinux-mode } - -License -------- - -Apache - -Author Information ------------------- - -Red Hat TripleO Validations Team diff --git a/validations_common/roles/undercloud_selinux_mode/vars/main.yml b/validations_common/roles/undercloud_selinux_mode/vars/main.yml deleted file mode 100644 index 60e9515..0000000 --- a/validations_common/roles/undercloud_selinux_mode/vars/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -metadata: - name: Undercloud SELinux Enforcing Mode Check - description: > - Check if the Undercloud is running SELinux in Enforcing mode. - groups: - - prep - - pre-introspection diff --git a/validations_common/roles/undercloud_service_status/README.md b/validations_common/roles/undercloud_service_status/README.md deleted file mode 100644 index 946bfa0..0000000 --- a/validations_common/roles/undercloud_service_status/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Undercloud-service-status -========================= - -An Ansible role to verify the Undercloud services states before running an -Update or Upgrade. - -Requirements ------------- - -This role needs to be run against an installed Undercloud. - -Role Variables --------------- - -- undercloud_service_list: A list of services actually coming from the tripleo-ansible-inventory - -Dependencies ------------- - -No dependencies. - -Example Playbook ----------------- - - - - hosts: undercloud - roles: - - { role: undercloud-service-status } - -License -------- - -Apache - -Author Information ------------------- - -Red Hat TripleO Validations Team. diff --git a/validations_common/roles/undercloud_service_status/vars/main.yaml b/validations_common/roles/undercloud_service_status/vars/main.yaml deleted file mode 100644 index f934d5c..0000000 --- a/validations_common/roles/undercloud_service_status/vars/main.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -metadata: - name: Verify undercloud services state before running update or upgrade - description: > - Check undercloud status before running a stack update - especially minor update and major upgrade. - groups: - - post-upgrade - - pre-upgrade