|
20 | 20 | - name: namespace
|
21 | 21 | file: argocd-namespace.yml
|
22 | 22 | - name: install
|
23 |
| - file: argocd-install.yml |
| 23 | + file: "{{ downloads.argocd_install.dest | basename }}" |
24 | 24 | namespace: "{{ argocd_namespace }}"
|
25 |
| - url: "{{ argocd_install_url }}" |
| 25 | + download: "{{ downloads.argocd_install }}" |
26 | 26 | when:
|
27 | 27 | - "inventory_hostname == groups['kube_control_plane'][0]"
|
28 | 28 |
|
29 | 29 | - name: Kubernetes Apps | Download ArgoCD remote manifests
|
30 | 30 | include_tasks: "../../../download/tasks/download_file.yml"
|
31 | 31 | vars:
|
32 |
| - download_argocd: |
33 |
| - enabled: "{{ argocd_enabled }}" |
34 |
| - file: true |
35 |
| - dest: "{{ local_release_dir }}/{{ item.file }}" |
36 |
| - url: "{{ item.url }}" |
37 |
| - unarchive: false |
38 |
| - owner: "root" |
39 |
| - mode: "0644" |
40 |
| - sha256: "" |
41 |
| - download: "{{ download_defaults | combine(download_argocd) }}" |
42 |
| - with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}" |
| 32 | + download: "{{ download_defaults | combine(item.download) }}" |
| 33 | + with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}" |
43 | 34 | loop_control:
|
44 | 35 | label: "{{ item.file }}"
|
45 | 36 | when:
|
|
54 | 45 | owner: false
|
55 | 46 | group: false
|
56 | 47 | delegate_to: "{{ inventory_hostname }}"
|
57 |
| - with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}" |
| 48 | + with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}" |
58 | 49 | when:
|
59 | 50 | - "inventory_hostname == groups['kube_control_plane'][0]"
|
60 | 51 |
|
61 | 52 | - name: Kubernetes Apps | Set ArgoCD namespace for remote manifests
|
62 | 53 | become: true
|
63 | 54 | command: |
|
64 | 55 | {{ bin_dir }}/yq eval-all -i '.metadata.namespace="{{ argocd_namespace }}"' {{ kube_config_dir }}/{{ item.file }}
|
65 |
| - with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}" |
| 56 | + with_items: "{{ argocd_templates | selectattr('download', 'defined') | list }}" |
66 | 57 | loop_control:
|
67 | 58 | label: "{{ item.file }}"
|
68 | 59 | when:
|
|
74 | 65 | src: "{{ item.file }}.j2"
|
75 | 66 | dest: "{{ kube_config_dir }}/{{ item.file }}"
|
76 | 67 | mode: "0644"
|
77 |
| - with_items: "{{ argocd_templates | selectattr('url', 'undefined') | list }}" |
| 68 | + with_items: "{{ argocd_templates | selectattr('download', 'undefined') | list }}" |
78 | 69 | loop_control:
|
79 | 70 | label: "{{ item.file }}"
|
80 | 71 | when:
|
|
0 commit comments