79 lines
2 KiB
YAML
79 lines
2 KiB
YAML
|
- name: Setup AWX
|
||
|
hosts: # ADD The HOST
|
||
|
gather_facts: false
|
||
|
module_defaults:
|
||
|
kubernetes.core.k8s:
|
||
|
kubeconfig: # Enter path to kubeconfig
|
||
|
metadata:
|
||
|
creationTimestamp: null
|
||
|
namespace: awx
|
||
|
kubernetes.core.helm:
|
||
|
kubeconfig: # Enter path to kubeconfig
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
|
||
|
- name: Create K8s Prereqs
|
||
|
block:
|
||
|
- name: Create AWX Namespace
|
||
|
kubernetes.core.k8s:
|
||
|
state: present
|
||
|
definition:
|
||
|
apiVersion: v1
|
||
|
kind: Namespace
|
||
|
metadata:
|
||
|
name: awx
|
||
|
spec: {}
|
||
|
status: {}
|
||
|
module_defaults:
|
||
|
metadata: {}
|
||
|
|
||
|
|
||
|
- name: Admin Password Secret
|
||
|
kubernetes.core.k8s:
|
||
|
state: present
|
||
|
definition:
|
||
|
apiVersion: v1
|
||
|
data:
|
||
|
password: # ADD Admin PW BASE64
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: awx-admin-password
|
||
|
|
||
|
|
||
|
- name: Create TLS Secret
|
||
|
kubernetes.core.k8s:
|
||
|
state: present
|
||
|
definition:
|
||
|
apiVersion: v1
|
||
|
data:
|
||
|
tls.crt: # ADD TLS Cert BASE64
|
||
|
tls.key: # ADD TLS KEY BASE64
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: awx-tls
|
||
|
type: kubernetes.io/tls
|
||
|
delegate_to: localhost
|
||
|
|
||
|
|
||
|
- name: Deploy AWX chart using inline values
|
||
|
kubernetes.core.helm:
|
||
|
name: awx
|
||
|
chart_repo_url: https://ansible.github.io/awx-operator/
|
||
|
chart_ref: awx-operator
|
||
|
chart_version: "{{ awx_chart_version }}"
|
||
|
release_namespace: awx
|
||
|
values:
|
||
|
AWX:
|
||
|
enabled: true
|
||
|
spec:
|
||
|
admin_user: # ADD USER NAME
|
||
|
admin_password_secret: awx-admin-password
|
||
|
ingress_type: ingress
|
||
|
ingress_hosts:
|
||
|
- hostname: # ADD HOST NAME
|
||
|
tls_secret: awx-tls
|
||
|
auto_upgrade: true
|
||
|
delegate_to: localhost
|
||
|
|