diff --git a/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md b/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md index e4d4b30..beabbf0 100644 --- a/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md +++ b/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md @@ -200,6 +200,25 @@ Run the following command to apply the Kerberos Keytab file as a configmap into kubectl -n awx create configmap awx-kerberos-config --from-file=/awx/krb5.conf ``` +### Create Custom DNS Host Records for Domain Controllers +You will need to be sure that AWX is able to resolve the FQDNs of the domain controllers for Kerberos to be happy. We will do this by adding another config file in the `/awx` directory and applying it to the deployment. +```jsx title="/awx/ad_hosts.yml" +apiVersion: v1 +kind: ConfigMap +metadata: + name: custom-hosts + namespace: default +data: + hosts: | + 192.168.3.25 LAB-DC-01.bunny-lab.io LAB-DC-01 + 192.168.3.26 LAB-DC-02.bunny-lab.io LAB-DC-02 +``` + +Then we apply them with the following command: +``` sh +kubectl apply -f ad_hosts.yml +``` + ### Create an AWX Container Group At this point, we need to make a custom pod for the AWX Execution Environments that will use this Kerberos file. Reference information was found [here](https://github.com/kurokobo/awx-on-k3s/blob/main/tips/use-kerberos.md#create-container-group). @@ -230,10 +249,19 @@ spec: - name: awx-kerberos-volume mountPath: /etc/krb5.conf subPath: krb5.conf + - name: custom-hosts + mountPath: /etc/hosts + subPath: hosts volumes: - name: awx-kerberos-volume configMap: name: awx-kerberos-config + - name: custom-hosts + configMap: + name: custom-hosts + items: + - key: hosts + path: hosts ``` ### Job Template & Inventory Examples