diff options
| author | alex <alex@pdp7.net> | 2023-02-20 23:40:21 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-02-20 23:40:21 +0100 |
| commit | e39389225f78bf1a7732bb5f6c36d458d763b878 (patch) | |
| tree | 7204b2f5072c7145f5f935624b5bae46f96174ce /personal_infra/playbooks | |
| parent | 4fa65b222e5d3050ed9351e4bf5127cc1525e88e (diff) | |
Allow multiple clusters
Diffstat (limited to 'personal_infra/playbooks')
| -rw-r--r-- | personal_infra/playbooks/roles/talos/README.md | 4 | ||||
| -rw-r--r-- | personal_infra/playbooks/roles/talos/tasks/main.yaml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/personal_infra/playbooks/roles/talos/README.md b/personal_infra/playbooks/roles/talos/README.md index ec364022..6c45f997 100644 --- a/personal_infra/playbooks/roles/talos/README.md +++ b/personal_infra/playbooks/roles/talos/README.md @@ -1,4 +1,4 @@ ``` -$ talosctl gen secrets -o talos/secrets.yaml -$ ansible-vault encrypt talos/secrets.yaml +$ talosctl gen secrets -o talos/$cluster-secrets.yaml +$ ansible-vault encrypt talos/$cluster-secrets.yaml ``` diff --git a/personal_infra/playbooks/roles/talos/tasks/main.yaml b/personal_infra/playbooks/roles/talos/tasks/main.yaml index 92d54b38..672061bc 100644 --- a/personal_infra/playbooks/roles/talos/tasks/main.yaml +++ b/personal_infra/playbooks/roles/talos/tasks/main.yaml @@ -38,7 +38,7 @@ - name: generate controlplane config shell: - cmd: talosctl gen config -t controlplane -o talos/host-{{ inventory_hostname }}.yaml --with-secrets <(ansible-vault view talos/secrets.yaml) --config-patch-control-plane @talos/host-{{ inventory_hostname }}.patch {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} + cmd: talosctl gen config -t controlplane -o talos/host-{{ inventory_hostname }}.yaml --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) --config-patch-control-plane @talos/host-{{ inventory_hostname }}.patch {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} chdir: "{{ inventory_dir }}" delegate_to: 127.0.0.1 when: "not 'resources' in nodes or nodes.resources|length == 0" @@ -52,7 +52,7 @@ - name: generate talosconfig shell: - cmd: talosctl gen config -t talosconfig -o talos/talosconfig-{{ talos_host.talos_cluster }} --with-secrets <(ansible-vault view talos/secrets.yaml) {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} + cmd: talosctl gen config -t talosconfig -o talos/talosconfig-{{ talos_host.talos_cluster }} --with-secrets <(ansible-vault view talos/{{ talos_host.talos_cluster }}-secrets.yaml) {{ talos_host.talos_cluster }} {{ talos_clusters[talos_host.talos_cluster].endpoint }} chdir: "{{ inventory_dir }}" delegate_to: 127.0.0.1 when: "not 'resources' in nodes or nodes.resources|length == 0" |
