Skip to content

Commit 702e475

Browse files
amartyasinhadanpawlik
authored andcommitted
Use role instead of playbooks - validations.yml
Before simplifying 06-deploy-edpm.yml, it is necessary to take care of import_playbook calls within that play There are three import_playbook calls within 06-deploy-edpm.yml - validations.yml - nfs.yml - ceph.yml This PR takes care of validations.yml It is continuation of simplification job execution [1]. [1] #2929
1 parent 16491ee commit 702e475

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

playbooks/06-deploy-architecture.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,10 @@
290290
name: run_hook
291291

292292
- name: Validations workflow
293-
ansible.builtin.import_playbook: validations.yml
294-
when: cifmw_execute_validations | default('false') | bool
293+
hosts: "{{ cifmw_target_host | default('localhost') }}"
294+
gather_facts: false
295+
tasks:
296+
- name: Run validations
297+
ansible.builtin.include_role:
298+
name: validations
299+
when: cifmw_execute_validations | default('false') | bool

playbooks/06-deploy-edpm.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@
173173
- name: Validations workflow
174174
# If we're doing an architecture deployment, we need to skip validations here.
175175
# Instead, they will be executed in the 06-deploy-architecture.yml playbook.
176-
when:
177-
- cifmw_architecture_scenario is not defined
178-
- cifmw_execute_validations | default('false') | bool
179-
ansible.builtin.import_playbook: validations.yml
176+
hosts: "{{ cifmw_target_host | default('localhost') }}"
177+
gather_facts: false
178+
tasks:
179+
- name: Run validations
180+
ansible.builtin.include_role:
181+
name: validations
182+
when:
183+
- cifmw_architecture_scenario is not defined
184+
- cifmw_execute_validations | default('false') | bool

playbooks/validations.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# NOTE: Playbook migrated to: 06-deploy-edpm.yml & 06-deploy-architecture.yml.
3+
# This migration is temporary, and will be further migrated to role.
4+
# DO NOT EDIT THAT PLAYBOOK. IT WOULD BE REMOVED IN NEAR FUTURE.
5+
#
16
- name: Execute the validations role
27
hosts: "{{ cifmw_target_host | default('localhost') }}"
38
gather_facts: false

0 commit comments

Comments
 (0)