Skip to content

Commit

Permalink
Allow users to run pre_tasks if required for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari LiVigni committed Oct 24, 2019
1 parent 996167f commit 36c329b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion playbooks/roles/playbook_hooks/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
- debug: msg="{{ hooks }}"

- name: "Adding external playbooks"
include: "{{ item }}"
include_tasks: "{{ item }}"
with_items: "{{ hooks }}"
6 changes: 6 additions & 0 deletions playbooks/roles/playbook_pre_tasks/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- debug: msg="{{ pre_tasks }}"

- name: "Running project pre-tasks {{ pre_tasks }}"
include_tasks: "{{ item }}"
with_items: "{{ pre_tasks }}"
1 change: 1 addition & 0 deletions playbooks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ignore_errors: yes
roles:
- { role: cleanup, when: run_cleanup|bool == true }
- { role: playbook_pre_tasks, when: "run_pre_tasks|bool == true and run_cleanup|bool == false" }
- role: create
- { role: prereqs, when: "run_prereqs|bool == true and setup_minishift|bool == true" }
- { role: minishift, when: "setup_minishift|bool == true" }
Expand Down

0 comments on commit 36c329b

Please sign in to comment.