commit 61c4fd013181134e117e0a1caa62aaed6fd1631a Author: Thomas Constans Date: Thu Jun 20 13:22:58 2024 +0200 initial version diff --git a/awx.yml b/awx.yml new file mode 100644 index 0000000..3de849d --- /dev/null +++ b/awx.yml @@ -0,0 +1,54 @@ +--- +- 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 + + diff --git a/k1.yml b/k1.yml new file mode 100644 index 0000000..5082fcb --- /dev/null +++ b/k1.yml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Find the latest tag here: https://github.com/ansible/awx-operator/releases + - github.com/ansible/awx-operator/config/default?ref=1.1.4 + +# Set the image tags to match the git version from above +images: + - name: quay.io/ansible/awx-operator + newTag: 1.1.4 + +# Specify a custom namespace in which to install AWX +namespace: awx diff --git a/k2.yml b/k2.yml new file mode 100644 index 0000000..5ccf610 --- /dev/null +++ b/k2.yml @@ -0,0 +1,15 @@ + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Find the latest tag here: https://github.com/ansible/awx-operator/releases + - github.com/ansible/awx-operator/config/default?ref=1.1.4 + - awx-demo.yaml + +# Set the image tags to match the git version from above +images: + - name: quay.io/ansible/awx-operator + newTag: 1.1.4 + +# Specify a custom namespace in which to install AWX +namespace: awx