--- - hosts: pilote1.formation.opendoor.fr tasks: - name: ensure we have everything package: state: present name: git - 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 /usr/local/bin/ 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