Listing 1: Persistenter Speicher für AWX und PGSQL spec: ... postgres_storage_requirements: requests: storage: 10Gi projects_persistence: true projects_storage_size: 10Gi Listing 2: Warten auf die AWX-API Wait for the AWX Api to be accessible ansible.builtin.uri: url: "http://{{ awxsetup.name }}.{{ awxsetup.baseurl }}/api/v2/ping" register: result until: "result.status == 200" retries: 30 delay: 10 Listing 3: Passwort abholen - name: Get Admin PW kubernetes.core.k8s_info: api_version: v1 kind: Secret name: "{{ awxsetup.name }}-adminpassword" namespace: "{{ awxsetup.namespace }}" register: awxadmin Listing 4: Tasks in einem Block zusammenfassen - name: Upload Config to AWX block: - name: Create Organization awx.awx.organization: ... ((viele Config-Tasks )) ... environment: CONTROLLER_PASSWORD: "{{ awxadmin. resources[0].data.password | b64decode }}" Listing 5: Organisation mit Credentials anlegen - name: Create Organization awx.awx.organization: name: "{{ org.name }}" description: "{{ org.desc }}" galaxy_credentials: - Ansible Galaxy state: present Listing 6: Default-Funktionen einsetzen - name: Create Inventory Hosts awx.awx.host: name: "{{ item.key }}" description: "{{ item.value.description }}" inventory: "{{ inventory.name }}" state: "present" enabled: true variables: ansible_host: "{{ item.value.ip }}" ansible_port: "{{ item.value.port | default('22') }}" with_dict: "{{ inventory_host }}"