mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
- separating database_configuration and deployment tasks into separate files to add ability to call configuration independently
35 lines
882 B
YAML
35 lines
882 B
YAML
---
|
|
- name: Scale down AWX Deployments
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ item }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
spec:
|
|
replicas: 0
|
|
loop:
|
|
- '{{ ansible_operator_meta.name }}-task'
|
|
- '{{ ansible_operator_meta.name }}-web'
|
|
|
|
- name: Get database configuration
|
|
include_tasks: database_configuration.yml
|
|
|
|
- name: Scale down PostgreSQL Statefulset
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: "{{ ansible_operator_meta.name }}-postgres-{{ supported_pg_version }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
spec:
|
|
replicas: 0
|
|
when: managed_database
|
|
|
|
- name: End Playbook
|
|
ansible.builtin.meta: end_play
|