ajout role awx
This commit is contained in:
47
roles/awx/tasks/main.yml
Normal file
47
roles/awx/tasks/main.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
- name: Preparation
|
||||
ansible.builtin.shell: curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.28.5+k3s1 sh -s - --write-kubeconfig-mode 644 --node-ip "{{ awx_ip }}" --flanel-iface "{{ awx_if }}"
|
||||
|
||||
- name: clonage du dépot awx-on-k3s
|
||||
git:
|
||||
repo: https://github.com/kurokobo/awx-on-k3s.git
|
||||
dest: "{{ awx_dir }}"
|
||||
clone: yes
|
||||
force: yes
|
||||
|
||||
- name: Deploiement AWX Operator ...
|
||||
ansible.builtin.shell: "kubectl apply -k operator"
|
||||
args:
|
||||
chdir: "{{ awx_dir }}"
|
||||
|
||||
- name: Git checkout
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/kurokobo/awx-on-k3s.git'
|
||||
dest: "{{ awx_dir }}"
|
||||
version: release-2.10.0
|
||||
|
||||
- name: Generation de certification auto-signé
|
||||
ansible.builtin.shell: 'openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./base/tls.crt -keyout ./base/tls.key -subj "/CN={{ awx_host }}/O={{ awx_host }}" -addext "subjectAltName = DNS:{{ awx_host }}"'
|
||||
args:
|
||||
chdir: "{{ awx_dir }}"
|
||||
|
||||
- name: creation du repertoire postgres-13
|
||||
ansible.builtin.file:
|
||||
path: /data/postgres-13
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Creation repertoire projects
|
||||
ansible.builtin.file:
|
||||
path: /data/projects
|
||||
state: directory
|
||||
owner: 1000:0
|
||||
|
||||
- name: Deploiement d'AWX ...
|
||||
ansible.builtin.shell: "kubectl apply -k base"
|
||||
args:
|
||||
chdir: "{{ awx_dir }}"
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user