Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more hooks for #274 #285

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ansible/roles/openshift-4-cluster/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@
src: "{{ ssh_public_key_location }}.pub"
register: slurped_ssh_public_key

###########################################################################################
# Handle pre-install-add-ons
###########################################################################################

- name: Include pre-install-add-ons
ansible.builtin.include_tasks: pre-install-add-ons.yml
when: add_ons_enabled
tags:
- pre-install
- add-ons
- pre-install-add-ons

- name: Create ignition files
ansible.builtin.include_tasks: create-ignition.yml
vars:
Expand Down
13 changes: 13 additions & 0 deletions ansible/roles/openshift-4-cluster/tasks/pre-install-add-ons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Include vars of stuff.yaml into the 'stuff' variable (2.2).
ansible.builtin.include_vars: "{{ playbook_dir }}/../add-ons.yml"

- name: "Handle pre_install_add_ons (include_role)"
ansible.builtin.include_role:
name: "{{ item.name }}"
tasks_from: "{{ item.tasks_from | default('main.yml') }}"
tags:
- pre-install
- add-ons
- pre-install-add-ons
with_items: "{{ pre_install_add_ons | default ([]) }}"
6 changes: 6 additions & 0 deletions docs/add-ons.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ post_install_add_ons:
- name: 'web-terminal'
# Default is main.yml
tasks_from: 'post-install.yml'

pre_install_add_ons:
- name: 'web-terminal'
# Default is main.yml
tasks_from: 'pre-install.yml'

EOF
```

Expand Down