|
|
|
|
@ -220,45 +220,45 @@
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
#- name: Checkout defined argocd-related objects
|
|
|
|
|
# ansible.builtin.git:
|
|
|
|
|
# repo: 'https://{{ gitea_admin_username }}:{{ gitea_admin_password }}@dev-gitea-01.smardigo.digital/gitea-admin/argocd.git'
|
|
|
|
|
# dest: '/tmp/gitrepo'
|
|
|
|
|
# version: master
|
|
|
|
|
# when:
|
|
|
|
|
# - inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
#
|
|
|
|
|
#- name: Find file with definition of argocd-AppProjects
|
|
|
|
|
# find:
|
|
|
|
|
# paths: '/tmp/gitrepo/AppProjects'
|
|
|
|
|
# pattern: '*.yml'
|
|
|
|
|
# register: appprojects
|
|
|
|
|
# when:
|
|
|
|
|
# - inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
#
|
|
|
|
|
#- name: Find file with definition of argocd-ApplicationSets
|
|
|
|
|
# find:
|
|
|
|
|
# paths: '/tmp/gitrepo/ApplicationSets'
|
|
|
|
|
# pattern: '*.yml'
|
|
|
|
|
# register: applicationsets
|
|
|
|
|
# when:
|
|
|
|
|
# - inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
#
|
|
|
|
|
#- name: Apply defined AppProjects defined in checked out repo
|
|
|
|
|
# kubernetes.core.k8s:
|
|
|
|
|
# state: present
|
|
|
|
|
# namespace: '{{ k8s_argocd_helm__release_namespace }}'
|
|
|
|
|
# src: '{{ item.path }}'
|
|
|
|
|
# loop: '{{ appprojects.files }}'
|
|
|
|
|
# when:
|
|
|
|
|
# - inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
#
|
|
|
|
|
#- name: Apply defined ApplicationSets defined in checked out repo
|
|
|
|
|
# kubernetes.core.k8s:
|
|
|
|
|
# state: present
|
|
|
|
|
# namespace: '{{ k8s_argocd_helm__release_namespace }}'
|
|
|
|
|
# src: '{{ item.path }}'
|
|
|
|
|
# loop: '{{ applicationsets.files }}'
|
|
|
|
|
# when:
|
|
|
|
|
# - inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
- name: Checkout defined argocd-related objects
|
|
|
|
|
ansible.builtin.git:
|
|
|
|
|
repo: 'https://{{ gitea_admin_username }}:{{ gitea_admin_password }}@dev-gitea-01.smardigo.digital/gitea-admin/argocd.git'
|
|
|
|
|
dest: '/tmp/gitrepo'
|
|
|
|
|
version: master
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
- name: Find file with definition of argocd-AppProjects
|
|
|
|
|
find:
|
|
|
|
|
paths: '/tmp/gitrepo/AppProjects'
|
|
|
|
|
pattern: '*.yml'
|
|
|
|
|
register: appprojects
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
- name: Find file with definition of argocd-ApplicationSets
|
|
|
|
|
find:
|
|
|
|
|
paths: '/tmp/gitrepo/ApplicationSets'
|
|
|
|
|
pattern: '*.yml'
|
|
|
|
|
register: applicationsets
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
- name: Apply defined AppProjects defined in checked out repo
|
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
|
state: present
|
|
|
|
|
namespace: '{{ k8s_argocd_helm__release_namespace }}'
|
|
|
|
|
src: '{{ item.path }}'
|
|
|
|
|
loop: '{{ appprojects.files }}'
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
- name: Apply defined ApplicationSets defined in checked out repo
|
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
|
state: present
|
|
|
|
|
namespace: '{{ k8s_argocd_helm__release_namespace }}'
|
|
|
|
|
src: '{{ item.path }}'
|
|
|
|
|
loop: '{{ applicationsets.files }}'
|
|
|
|
|
when:
|
|
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
|
|
|
|
|
|
|
|
|
|