Skip to content

Commit

Permalink
allowing templates to be applied AFTER the cluster is fully up
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Leiner committed Jan 10, 2024
1 parent 74b89d5 commit f87441a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/cluster_manifest/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
kubernetes_api_server_host: "{{ hostvars[groups['rke2_servers'][0]].inventory_hostname }}"
13 changes: 13 additions & 0 deletions roles/cluster_manifest/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

- name: Add cluster manifest addons files
ansible.builtin.copy:
src: "{{ cluster_manifest_config_file_path }}"
dest: "/var/lib/rancher/rke2/server/manifests/"
mode: '0640'
owner: root
group: root
when:

Check failure on line 10 in roles/cluster_manifest/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint for PR

10:8 [trailing-spaces] trailing spaces

Check failure on line 10 in roles/cluster_manifest/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint for PR

10:8 [trailing-spaces] trailing spaces

Check failure on line 10 in roles/cluster_manifest/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint for push

10:8 [trailing-spaces] trailing spaces
- inventory_hostname in groups['rke2_servers'][0]
- cluster_manifest_config_file_path is defined
- cluster_manifest_config_file_path | length > 0
1 change: 1 addition & 0 deletions roles/cluster_manifest/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
7 changes: 7 additions & 0 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@
roles:
- role: rke2_agent
serial: 3

- name: Cluster manifest play
hosts: rke2_servers
any_errors_fatal: true
become: true
roles:
- role: cluster_manifest

Check failure on line 24 in site.yml

View workflow job for this annotation

GitHub Actions / Lint for PR

24:29 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 24 in site.yml

View workflow job for this annotation

GitHub Actions / Lint for PR

24:29 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 24 in site.yml

View workflow job for this annotation

GitHub Actions / Lint for push

24:29 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit f87441a

Please sign in to comment.