Skip to content

Commit fd9af20

Browse files
amartyasinhabshewale
authored andcommitted
Use role instead of playbooks - 03-build-packages.yml
It is continuation of simplification job execution [1]. [1] #2929
1 parent 14950c1 commit fd9af20

3 files changed

Lines changed: 38 additions & 4 deletions

File tree

deploy-edpm.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,16 @@
5555
tags:
5656
- infra
5757

58-
- name: Import package build playbook
59-
ansible.builtin.import_playbook: playbooks/03-build-packages.yml
60-
tags:
61-
- build-packages
58+
- name: Build package playbook
59+
hosts: "{{ cifmw_target_host | default('localhost') }}"
60+
gather_facts: false
61+
tasks:
62+
- name: Build package playbook
63+
ansible.builtin.import_role:
64+
name: cifmw_setup
65+
tasks_from: build_packages.yml
66+
tags:
67+
- build-packages
6268

6369
- name: Import containers build playbook
6470
ansible.builtin.import_playbook: playbooks/04-build-containers.yml

playbooks/03-build-packages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
#
3+
# NOTE: Playbook migrated to: cifmw_setup/build_packages.yml.
4+
# DO NOT EDIT THAT PLAYBOOK. IT WOULD BE REMOVED IN NEAR FUTURE.
5+
#
26
- name: Build package playbook
37
hosts: "{{ cifmw_target_host | default('localhost') }}"
48
gather_facts: false
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
- name: Run pre_package_build hooks
3+
vars:
4+
step: pre_package_build
5+
ansible.builtin.import_role:
6+
name: run_hook
7+
8+
- name: Load parameters files
9+
ansible.builtin.include_vars:
10+
dir: "{{ cifmw_basedir }}/artifacts/parameters"
11+
12+
- name: Build packages
13+
when:
14+
- cifmw_pkg_build_list is defined
15+
- cifmw_pkg_build_list | length > 0
16+
ansible.builtin.import_role:
17+
name: pkg_build
18+
tasks_from: build.yml
19+
20+
- name: Run post_package_build hooks
21+
vars:
22+
step: post_package_build
23+
ansible.builtin.import_role:
24+
name: run_hook

0 commit comments

Comments
 (0)