Browse Source

(follow-up) run check mode for more molecule tests

* Add check testing in _skeleton_role_ so all newly created roles will
  run check.

* Add check testing for the following roles:
  - tripleo_bootstrap
  - tripleo_clients_install
  - tripleo_config
  - tripleo_container_image_prepare
  - tripleo_container_rm
  - tripleo_container_stop
  - tripleo_container_tag
  - tripleo_create_admin
  - tripleo_firewall
  - tripleo_hosts_entries
  - tripleo_image_serve
  - tripleo_kernel
  - tripleo_keystone_resources
  - tripleo_module_load
  - tripleo_podman
  - tripleo_puppet_cache
  - tripleo_ssh_known_hosts
  - tripleo_sshd
  - tripleo_systemd_wrapper
  - tripleo_timezone

* Fix check mode for some roles.

Change-Id: I747de97a3ad4520e7fc9038f13c453421e86c057
changes/78/719578/4
Emilien Macchi 2 years ago
parent
commit
b3ba0be231
  1. 1
      _skeleton_role_/molecule/default/molecule.yml
  2. 1
      tripleo_ansible/roles/tripleo_bootstrap/molecule/default/molecule.yml
  3. 1
      tripleo_ansible/roles/tripleo_clients_install/molecule/default/molecule.yml
  4. 1
      tripleo_ansible/roles/tripleo_config/molecule/default/molecule.yml
  5. 1
      tripleo_ansible/roles/tripleo_container_image_prepare/molecule/default/molecule.yml
  6. 2
      tripleo_ansible/roles/tripleo_container_rm/molecule/default/molecule.yml
  7. 2
      tripleo_ansible/roles/tripleo_container_rm/molecule/docker_rm/molecule.yml
  8. 2
      tripleo_ansible/roles/tripleo_container_rm/molecule/legacy_vars/molecule.yml
  9. 2
      tripleo_ansible/roles/tripleo_container_rm/molecule/podman-rm-stopped/molecule.yml
  10. 2
      tripleo_ansible/roles/tripleo_container_rm/molecule/podman/molecule.yml
  11. 2
      tripleo_ansible/roles/tripleo_container_stop/molecule/default/molecule.yml
  12. 2
      tripleo_ansible/roles/tripleo_container_stop/molecule/podman/molecule.yml
  13. 2
      tripleo_ansible/roles/tripleo_container_tag/molecule/default/molecule.yml
  14. 2
      tripleo_ansible/roles/tripleo_container_tag/molecule/legacy_vars/molecule.yml
  15. 2
      tripleo_ansible/roles/tripleo_container_tag/molecule/podman/molecule.yml
  16. 1
      tripleo_ansible/roles/tripleo_create_admin/molecule/addkey/molecule.yml
  17. 1
      tripleo_ansible/roles/tripleo_create_admin/molecule/default/molecule.yml
  18. 1
      tripleo_ansible/roles/tripleo_create_admin/molecule/keygen/molecule.yml
  19. 2
      tripleo_ansible/roles/tripleo_firewall/molecule/default/molecule.yml
  20. 2
      tripleo_ansible/roles/tripleo_firewall/molecule/firewall-add-complex/molecule.yml
  21. 2
      tripleo_ansible/roles/tripleo_firewall/molecule/firewall-add/molecule.yml
  22. 2
      tripleo_ansible/roles/tripleo_firewall/molecule/firewall-remove-complex/molecule.yml
  23. 2
      tripleo_ansible/roles/tripleo_firewall/molecule/firewall-remove/molecule.yml
  24. 1
      tripleo_ansible/roles/tripleo_hosts_entries/molecule/default/molecule.yml
  25. 1
      tripleo_ansible/roles/tripleo_image_serve/molecule/default/molecule.yml
  26. 1
      tripleo_ansible/roles/tripleo_image_serve/molecule/legacy_vars/molecule.yml
  27. 2
      tripleo_ansible/roles/tripleo_kernel/molecule/default/molecule.yml
  28. 2
      tripleo_ansible/roles/tripleo_kernel/molecule/extra/molecule.yml
  29. 2
      tripleo_ansible/roles/tripleo_kernel/molecule/kernelargs/molecule.yml
  30. 1
      tripleo_ansible/roles/tripleo_kernel/tasks/kernelargs.yml
  31. 1
      tripleo_ansible/roles/tripleo_kernel/tasks/reboot.yaml
  32. 1
      tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/molecule.yml
  33. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/domains.yml
  34. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/endpoints.yml
  35. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/projects.yml
  36. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/roles.yml
  37. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/services.yml
  38. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/user_per_role.yml
  39. 6
      tripleo_ansible/roles/tripleo_keystone_resources/tasks/users.yml
  40. 2
      tripleo_ansible/roles/tripleo_module_load/molecule/default/molecule.yml
  41. 2
      tripleo_ansible/roles/tripleo_module_load/molecule/legacy_vars/molecule.yml
  42. 2
      tripleo_ansible/roles/tripleo_module_load/molecule/remove_module/molecule.yml
  43. 2
      tripleo_ansible/roles/tripleo_podman/molecule/default/molecule.yml
  44. 2
      tripleo_ansible/roles/tripleo_podman/molecule/install/molecule.yml
  45. 2
      tripleo_ansible/roles/tripleo_podman/molecule/login/molecule.yml
  46. 1
      tripleo_ansible/roles/tripleo_podman/tasks/tripleo_podman_install.yml
  47. 1
      tripleo_ansible/roles/tripleo_puppet_cache/molecule/default/molecule.yml
  48. 1
      tripleo_ansible/roles/tripleo_ssh_known_hosts/molecule/default/molecule.yml
  49. 1
      tripleo_ansible/roles/tripleo_ssh_known_hosts/molecule/no_networks/molecule.yml
  50. 1
      tripleo_ansible/roles/tripleo_sshd/molecule/banners/molecule.yml
  51. 1
      tripleo_ansible/roles/tripleo_sshd/molecule/default/molecule.yml
  52. 1
      tripleo_ansible/roles/tripleo_systemd_wrapper/molecule/default/molecule.yml
  53. 1
      tripleo_ansible/roles/tripleo_timezone/molecule/default/molecule.yml

1
_skeleton_role_/molecule/default/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_bootstrap/molecule/default/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_clients_install/molecule/default/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_config/molecule/default/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_container_image_prepare/molecule/default/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

2
tripleo_ansible/roles/tripleo_container_rm/molecule/default/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_rm/molecule/docker_rm/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_rm/molecule/legacy_vars/molecule.yml

@ -37,7 +37,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_rm/molecule/podman-rm-stopped/molecule.yml

@ -37,7 +37,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_rm/molecule/podman/molecule.yml

@ -37,7 +37,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_stop/molecule/default/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_stop/molecule/podman/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_tag/molecule/default/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_tag/molecule/legacy_vars/molecule.yml

@ -37,7 +37,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_container_tag/molecule/podman/molecule.yml

@ -37,7 +37,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

1
tripleo_ansible/roles/tripleo_create_admin/molecule/addkey/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_create_admin/molecule/default/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_create_admin/molecule/keygen/molecule.yml

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

2
tripleo_ansible/roles/tripleo_firewall/molecule/default/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_firewall/molecule/firewall-add-complex/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_firewall/molecule/firewall-add/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_firewall/molecule/firewall-remove-complex/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_firewall/molecule/firewall-remove/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

1
tripleo_ansible/roles/tripleo_hosts_entries/molecule/default/molecule.yml

@ -74,6 +74,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_image_serve/molecule/default/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_image_serve/molecule/legacy_vars/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

2
tripleo_ansible/roles/tripleo_kernel/molecule/default/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_kernel/molecule/extra/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_kernel/molecule/kernelargs/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: ansible

1
tripleo_ansible/roles/tripleo_kernel/tasks/kernelargs.yml

@ -38,6 +38,7 @@
reboot_required: true
become: true
when:
- cmdline.stdout_lines is defined
- tripleo_kernel_args|string
- tripleo_kernel_args not in cmdline.stdout_lines[0]

1
tripleo_ansible/roles/tripleo_kernel/tasks/reboot.yaml

@ -49,6 +49,7 @@
- "{{ ifcfg_files.files }}"
become: true
when:
- os_net_ifcfg_files.matched is defined
- os_net_ifcfg_files.matched == 0
- name: Reboot debug message

1
tripleo_ansible/roles/tripleo_keystone_resources/molecule/default/molecule.yml

@ -30,6 +30,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/domains.yml

@ -19,8 +19,8 @@
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
name: "{{ tripleo_keystone_resources_domain }}"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_domain_results
loop: "{{ batched_tripleo_keystone_resources_domains }}"
loop_control:
@ -35,3 +35,5 @@
register: tripleo_keystone_resources_domain_async_poll_results
until: tripleo_keystone_resources_domain_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/endpoints.yml

@ -23,8 +23,8 @@
endpoint_interface: "{{ keystone_endpoint_type }}"
region: "{{ tripleo_keystone_resources_data.value.region }}"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_endpoint_results
loop: "{{ batched_tripleo_keystone_resources_data }}"
loop_control:
@ -40,3 +40,5 @@
register: tripleo_keystone_resources_endpoint_async_poll_results
until: tripleo_keystone_resources_endpoint_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/projects.yml

@ -20,8 +20,8 @@
name: "{{ tripleo_keystone_resources_project }}"
domain_id: default
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_project_results
loop: "{{ batched_tripleo_keystone_resources_projects }}"
loop_control:
@ -36,3 +36,5 @@
register: tripleo_keystone_resources_project_async_poll_results
until: tripleo_keystone_resources_project_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/roles.yml

@ -19,8 +19,8 @@
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
name: "{{ tripleo_keystone_resources_role }}"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_role_results
loop: "{{ batched_tripleo_keystone_resources_roles }}"
loop_control:
@ -35,3 +35,5 @@
register: tripleo_keystone_resources_role_async_poll_results
until: tripleo_keystone_resources_role_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/services.yml

@ -22,8 +22,8 @@
service_type: "{{ tripleo_keystone_resources_data.value.service }}"
description: "OpenStack {{ tripleo_keystone_resources_data.value.service | title() }} Service"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_service_results
loop: "{{ batched_tripleo_keystone_resources_data }}"
loop_control:
@ -39,3 +39,5 @@
register: tripleo_keystone_resources_service_async_poll_results
until: tripleo_keystone_resources_service_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/user_per_role.yml

@ -25,8 +25,8 @@
get_domain_id(all_domains=openstack_domains) | default(omit) }}
role: "{{ batched_tripleo_keystone_resources_roles_data.key }}"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_user_role_results
loop: "{{ tripleo_keystone_resources_data_users }}"
loop_control:
@ -41,3 +41,5 @@
register: tripleo_keystone_resources_user_role_async_poll_results
until: tripleo_keystone_resources_user_role_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

6
tripleo_ansible/roles/tripleo_keystone_resources/tasks/users.yml

@ -24,8 +24,8 @@
email: "{{ lookup('dict', tripleo_keystone_resources_data).key }}@localhost"
domain: "{{ lookup('dict', tripleo_keystone_resources_data).value.domain | default('default') }}"
state: present
async: 60
poll: 0
async: "{{ (not ansible_check_mode | bool) | ternary('60', omit) }}"
poll: "{{ (not ansible_check_mode | bool) | ternary('0', omit) }}"
register: tripleo_keystone_resources_user_results
loop: "{{ batched_tripleo_keystone_resources_data }}"
loop_control:
@ -41,3 +41,5 @@
register: tripleo_keystone_resources_user_async_poll_results
until: tripleo_keystone_resources_user_async_poll_results.finished
retries: 30
when:
- not ansible_check_mode|bool

2
tripleo_ansible/roles/tripleo_module_load/molecule/default/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_module_load/molecule/legacy_vars/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_module_load/molecule/remove_module/molecule.yml

@ -43,7 +43,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_podman/molecule/default/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_podman/molecule/install/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

2
tripleo_ansible/roles/tripleo_podman/molecule/login/molecule.yml

@ -42,7 +42,7 @@ scenario:
test_sequence:
- prepare
- converge
- verify
- check
verifier:
name: testinfra

1
tripleo_ansible/roles/tripleo_podman/tasks/tripleo_podman_install.yml

@ -32,6 +32,7 @@
- name: Delete cni0 interface
command: ip link delete cni0
when:
- cni0_interface.rc is defined
- cni0_interface.rc == 0
- name: Check if 87-podman-bridge.conflist exists

1
tripleo_ansible/roles/tripleo_puppet_cache/molecule/default/molecule.yml vendored

@ -40,6 +40,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_ssh_known_hosts/molecule/default/molecule.yml

@ -64,6 +64,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_ssh_known_hosts/molecule/no_networks/molecule.yml

@ -50,6 +50,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_sshd/molecule/banners/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_sshd/molecule/default/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_systemd_wrapper/molecule/default/molecule.yml

@ -50,6 +50,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

1
tripleo_ansible/roles/tripleo_timezone/molecule/default/molecule.yml

@ -58,6 +58,7 @@ scenario:
- create
- prepare
- converge
- check
- verify
- destroy

Loading…
Cancel
Save