Files
awx_abr/awx.yml
2024-06-20 13:22:58 +02:00

55 lines
1.3 KiB
YAML

---
- hosts: pilote1.formation.opendoor.fr
tasks:
- name: get install script 1
get_url:
url: https://get.k3s.io
dest: /tmp/k3S.sh
mode: 0700
- name: run script
command: /tmp/k3S.sh
args:
creates: /usr/local/bin/k3s
- name: get kustomize install script
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
dest: /tmp/
mode: 0700
- name: run kustomize install script
ansible.builtin.command: /tmp/install_kustomize.sh
args:
creates: /usr/local/bin/kustomize
- name: install kustomization file
ansible.builtin.copy:
src: k1.yml
dest: /tmp/kustomization.yaml
- name: kustomize 1
ansible.builtin.shell: "/usr/local/bin/kustomize build . | /usr/local/bin/kubectl apply -f -"
args:
chdir: /tmp
- name: awx-demo.yaml
ansible.builtin.copy:
src: awx-demo.yaml
dest: /tmp/awx-demo.yaml
- name: install kustomization file 2
ansible.builtin.copy:
src: k2.yml
dest: /tmp/kustomization.yaml
- name: set context
ansible.builtin.command: /usr/local/bin/kubectl config set-context --current --namespace=awx
- name: kustomize 2
ansible.builtin.shell: "/usr/local/bin/kustomize build . | /usr/local/bin/kubectl apply -f -"
args:
chdir: /tmp