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

Extra Manifest delpoyment #244

Merged
merged 3 commits into from
Nov 10, 2023
Merged
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
3 changes: 3 additions & 0 deletions inventory-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
extra_server_args: ""
extra_agent_args: ""

# Optional vars

Check warning on line 22 in inventory-sample.yml

View workflow job for this annotation

GitHub Actions / Lint

yaml[comments-indentation]

Comment not indented like content

Check warning on line 22 in inventory-sample.yml

View workflow job for this annotation

GitHub Actions / Lint

22:3 [comments-indentation] comment not indented like content
# api_port: 6443

Check warning on line 23 in inventory-sample.yml

View workflow job for this annotation

GitHub Actions / Lint

yaml[comments-indentation]

Comment not indented like content

Check warning on line 23 in inventory-sample.yml

View workflow job for this annotation

GitHub Actions / Lint

23:5 [comments-indentation] comment not indented like content
# k3s_server_location: /var/lib/rancher/k3s
# systemd_dir: /etc/systemd/system
# extra_service_envs: [ 'ENV_VAR1=VALUE1', 'ENV_VAR2=VALUE2' ]
# List of locally available manifests to apply to the cluster, useful for PVCs or Traefik modifications.
# Manifests should be either full paths or relative to the playbook directory.
# extra_manifests: [ '/path/to/manifest1.yaml', '/path/to/manifest2.yaml' ]
15 changes: 15 additions & 0 deletions roles/prereq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,18 @@
src: "{{ k3s_server_location }}"
force: true
state: link

- name: Setup extra manifests
when: extra_manifests is defined
block:
- name: Make manifests directory
ansible.builtin.file:
path: "/var/lib/rancher/k3s/server/manifests"
mode: 0700
state: directory
- name: Copy manifests
ansible.builtin.copy:
src: "{{ item }}"
dest: "/var/lib/rancher/k3s/server/manifests"
mode: 0600
loop: "{{ extra_manifests }}"
Loading