Compare commits
3 Commits
9cbb84a0f3
...
Appliance.
Author | SHA1 | Date | |
---|---|---|---|
5740faeb9d | |||
e057f313ea | |||
ac38731dcf |
@ -10,6 +10,23 @@
|
|||||||
# - argo-workflows
|
# - argo-workflows
|
||||||
- firstboot
|
- firstboot
|
||||||
|
|
||||||
|
- name: Create ClusterRoleBinding for default serviceaccount
|
||||||
|
kubernetes.core.k8s:
|
||||||
|
state: present
|
||||||
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
|
definition: |
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: argo-workflows-firstboot-clusteradmin
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: default
|
||||||
|
namespace: firstboot
|
||||||
|
|
||||||
- name: Install argo-workflows chart
|
- name: Install argo-workflows chart
|
||||||
kubernetes.core.helm:
|
kubernetes.core.helm:
|
||||||
name: argo-workflows
|
name: argo-workflows
|
||||||
@ -20,8 +37,15 @@
|
|||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
values: "{{ components['argo-workflows'].chart_values }}"
|
values: "{{ components['argo-workflows'].chart_values }}"
|
||||||
|
|
||||||
# - name: Trigger handlers
|
- name: Ensure argo workflows API availability
|
||||||
# ansible.builtin.meta: flush_handlers
|
ansible.builtin.uri:
|
||||||
|
url: https://workflow.{{ vapp['metacluster.fqdn'] }}/api/v1/version
|
||||||
|
method: GET
|
||||||
|
register: api_readycheck
|
||||||
|
until:
|
||||||
|
- api_readycheck.json.version is defined
|
||||||
|
retries: "{{ playbook.retries }}"
|
||||||
|
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||||
|
|
||||||
module_defaults:
|
module_defaults:
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
|
@ -58,6 +58,7 @@ components:
|
|||||||
|
|
||||||
argo-cd:
|
argo-cd:
|
||||||
helm:
|
helm:
|
||||||
|
# Must match the version referenced at `dependencies.static_binaries[.filename==argo].url`
|
||||||
version: 6.7.7 # (=Argo CD v2.10.5)
|
version: 6.7.7 # (=Argo CD v2.10.5)
|
||||||
chart: argo/argo-cd
|
chart: argo/argo-cd
|
||||||
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
|
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
|
||||||
@ -85,11 +86,19 @@ components:
|
|||||||
chart: argo/argo-workflows
|
chart: argo/argo-workflows
|
||||||
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
|
parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /'
|
||||||
chart_values: !unsafe |
|
chart_values: !unsafe |
|
||||||
|
# workflow:
|
||||||
|
# serviceAccount:
|
||||||
|
# create: true
|
||||||
|
# name: "argo-workflows"
|
||||||
|
# rbac:
|
||||||
|
# create: true
|
||||||
controller:
|
controller:
|
||||||
workflowNamespaces:
|
workflowNamespaces:
|
||||||
- default
|
- default
|
||||||
- firstboot
|
- firstboot
|
||||||
server:
|
server:
|
||||||
|
authModes:
|
||||||
|
- server
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
hosts:
|
hosts:
|
||||||
@ -355,6 +364,8 @@ dependencies:
|
|||||||
- registry.k8s.io/sig-storage/livenessprobe:v2.10.0
|
- registry.k8s.io/sig-storage/livenessprobe:v2.10.0
|
||||||
|
|
||||||
static_binaries:
|
static_binaries:
|
||||||
|
- filename: argo
|
||||||
|
url: https://github.com/argoproj/argo-workflows/releases/download/v3.5.7/argo-linux-amd64.gz
|
||||||
- filename: clusterctl
|
- filename: clusterctl
|
||||||
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/clusterctl-linux-amd64
|
url: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/clusterctl-linux-amd64
|
||||||
- filename: govc
|
- filename: govc
|
||||||
|
@ -5,12 +5,42 @@
|
|||||||
- vars/pb.secrets.yaml
|
- vars/pb.secrets.yaml
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- name: Retrieve target folder details
|
||||||
|
community.vmware.vmware_vm_info:
|
||||||
|
hostname: "{{ hv.hostname }}"
|
||||||
|
username: "{{ hv.username }}"
|
||||||
|
password: "{{ secrets.hv.password }}"
|
||||||
|
folder: "{{ hv.folder }}"
|
||||||
|
validate_certs: false
|
||||||
|
register: vm_info
|
||||||
|
|
||||||
|
- name: User prompt
|
||||||
|
ansible.builtin.pause:
|
||||||
|
prompt: Virtual machine '{{ appliance.id }}' already exists. Delete to continue [yes] or abort [no]?"
|
||||||
|
register: prompt
|
||||||
|
until:
|
||||||
|
- prompt.user_input in ['yes', 'no']
|
||||||
|
delay: 0
|
||||||
|
when: (vm_info | selectattr('guest_name', 'equalto', appliance.id) | length) > 0
|
||||||
|
|
||||||
|
- name: Destroy existing VM
|
||||||
|
community.vmware.vmware_guest:
|
||||||
|
hostname: "{{ hv.hostname }}"
|
||||||
|
username: "{{ hv.username }}"
|
||||||
|
password: "{{ secrets.hv.password }}"
|
||||||
|
folder: "{{ hv.folder }}"
|
||||||
|
name: appliance.id
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- (vm_info | selectattr('guest_name', 'equalto', appliance.id) | length) > 0
|
||||||
|
- (prompt.user_input | bool) == true
|
||||||
|
|
||||||
- name: Deploy VM from OVA-template
|
- name: Deploy VM from OVA-template
|
||||||
community.vmware.vmware_deploy_ovf:
|
community.vmware.vmware_deploy_ovf:
|
||||||
hostname: "{{ hv.hostname }}"
|
hostname: "{{ hv.hostname }}"
|
||||||
username: "{{ hv.username }}"
|
username: "{{ hv.username }}"
|
||||||
password: "{{ secrets.hv.password }}"
|
password: "{{ secrets.hv.password }}"
|
||||||
validate_certs: no
|
validate_certs: false
|
||||||
datacenter: "{{ hv.datacenter }}"
|
datacenter: "{{ hv.datacenter }}"
|
||||||
folder: "{{ hv.folder }}"
|
folder: "{{ hv.folder }}"
|
||||||
cluster: "{{ hv.cluster }}"
|
cluster: "{{ hv.cluster }}"
|
||||||
|
Reference in New Issue
Block a user