mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-09-08 21:27:36 +02:00
build
This commit is contained in:
@@ -29,18 +29,21 @@
|
||||
url: "{{ helm_url }}"
|
||||
dest: "/tmp/{{ helm_tar }}"
|
||||
mode: '0644'
|
||||
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Create Helm config directory
|
||||
file:
|
||||
path: /home/jd/.config/helm
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Extract Helm archive
|
||||
unarchive:
|
||||
src: "/tmp/{{ helm_tar }}"
|
||||
dest: /tmp
|
||||
remote_src: true
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Install Helm binary
|
||||
copy:
|
||||
@@ -48,11 +51,12 @@
|
||||
dest: "{{ helm_bin }}"
|
||||
mode: '0755'
|
||||
remote_src: true
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Verify Helm installation
|
||||
command: helm version
|
||||
environment: "{{ helm_env }}"
|
||||
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
# ----------------------------
|
||||
# 2. Prepare Helm config dir
|
||||
# ----------------------------
|
||||
@@ -61,7 +65,7 @@
|
||||
path: /tmp/helm/.config/helm
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
# ----------------------------
|
||||
# 3. Add NFS Helm repo
|
||||
# ----------------------------
|
||||
@@ -70,10 +74,12 @@
|
||||
name: nfs-subdir-external-provisioner
|
||||
repo_url: https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
|
||||
environment: "{{ helm_env }}"
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Update Helm repos
|
||||
command: helm repo update
|
||||
environment: "{{ helm_env }}"
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
# ----------------------------
|
||||
# 4. Install NFS provisioner
|
||||
@@ -93,6 +99,7 @@
|
||||
defaultClass: true
|
||||
kubeconfig: "{{ kubeconfig }}"
|
||||
environment: "{{ helm_env }}"
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Ensure correct ownership of Helm config
|
||||
file:
|
||||
@@ -100,3 +107,4 @@
|
||||
state: directory
|
||||
owner: jd
|
||||
group: jd
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
Reference in New Issue
Block a user