diff options
Diffstat (limited to 'installer/roles/kubernetes')
-rw-r--r-- | installer/roles/kubernetes/defaults/main.yml | 6 | ||||
-rw-r--r-- | installer/roles/kubernetes/tasks/backup.yml | 2 | ||||
-rw-r--r-- | installer/roles/kubernetes/tasks/kubernetes.yml | 3 | ||||
-rw-r--r-- | installer/roles/kubernetes/tasks/main.yml | 20 | ||||
-rw-r--r-- | installer/roles/kubernetes/tasks/openshift.yml | 4 | ||||
-rw-r--r-- | installer/roles/kubernetes/tasks/openshift_auth.yml | 1 |
6 files changed, 17 insertions, 19 deletions
diff --git a/installer/roles/kubernetes/defaults/main.yml b/installer/roles/kubernetes/defaults/main.yml index 95612d7f35..b26fbb2222 100644 --- a/installer/roles/kubernetes/defaults/main.yml +++ b/installer/roles/kubernetes/defaults/main.yml @@ -1,6 +1,6 @@ --- dockerhub_version: "{{ lookup('file', playbook_dir + '/../VERSION') }}" -create_preload_data: True +create_preload_data: true admin_user: 'admin' admin_email: 'root@localhost' @@ -36,7 +36,7 @@ kubernetes_rabbitmq_image: "ansible/awx_rabbitmq" kubernetes_memcached_version: "latest" kubernetes_memcached_image: "memcached" -openshift_pg_emptydir: no +openshift_pg_emptydir: false openshift_pg_pvc_name: postgresql kubernetes_deployment_name: awx @@ -55,6 +55,6 @@ custom_venvs_path: "/opt/custom-venvs" custom_venvs_python: "python2" ca_trust_bundle: "/etc/pki/tls/certs/ca-bundle.crt" -rabbitmq_use_ssl: False +rabbitmq_use_ssl: false container_groups_image: "ansible/ansible-runner" diff --git a/installer/roles/kubernetes/tasks/backup.yml b/installer/roles/kubernetes/tasks/backup.yml index a4b0c5cd9d..ebd53aadb1 100644 --- a/installer/roles/kubernetes/tasks/backup.yml +++ b/installer/roles/kubernetes/tasks/backup.yml @@ -55,7 +55,7 @@ --port={{ pg_port | default('5432') }} \ --username='{{ pg_username }}' \ --dbname='{{ pg_database }}'" > {{ playbook_dir }}/tower-openshift-backup-{{ now }}/tower.db - no_log: yes + no_log: true - name: Copy inventory into backup directory copy: diff --git a/installer/roles/kubernetes/tasks/kubernetes.yml b/installer/roles/kubernetes/tasks/kubernetes.yml index 717ee4bcd0..fe630a67ec 100644 --- a/installer/roles/kubernetes/tasks/kubernetes.yml +++ b/installer/roles/kubernetes/tasks/kubernetes.yml @@ -2,7 +2,7 @@ - name: Get Namespace Detail shell: "kubectl get namespace {{ kubernetes_namespace }}" register: namespace_details - ignore_errors: yes + ignore_errors: true - name: Create AWX Kubernetes Project shell: "kubectl create namespace {{ kubernetes_namespace }}" @@ -12,4 +12,3 @@ set_fact: postgresql_service_name: "{{ kubernetes_deployment_name }}-postgresql" when: "pg_hostname is not defined or pg_hostname == ''" - diff --git a/installer/roles/kubernetes/tasks/main.yml b/installer/roles/kubernetes/tasks/main.yml index 1acd4422fd..faff3a83b2 100644 --- a/installer/roles/kubernetes/tasks/main.yml +++ b/installer/roles/kubernetes/tasks/main.yml @@ -32,7 +32,7 @@ {{ kubernetes_deployment_name }} \ -n {{ kubernetes_namespace }} -o=jsonpath='{.status.replicas}' register: deployment_details - ignore_errors: yes + ignore_errors: true - name: Set expected post-deployment Replicas value set_fact: @@ -48,7 +48,7 @@ - name: Get Postgres Service Detail shell: "{{ kubectl_or_oc }} describe svc {{ postgresql_service_name }} -n {{ kubernetes_namespace }}" register: postgres_svc_details - ignore_errors: yes + ignore_errors: true when: "pg_hostname is not defined or pg_hostname == ''" - name: Deploy PostgreSQL (OpenShift) @@ -72,7 +72,7 @@ -e POSTGRESQL_VERSION=10 \ -n {{ kubernetes_namespace }} register: openshift_pg_activate - no_log: yes + no_log: true when: - pg_hostname is not defined or pg_hostname == '' - postgres_svc_details is defined and postgres_svc_details.rc != 0 @@ -83,7 +83,7 @@ - name: Template PostgreSQL Deployment (Kubernetes) set_fact: pg_values: "{{ lookup('template', 'postgresql-values.yml.j2') }}" - no_log: yes + no_log: true - name: Deploy and Activate Postgres (Kubernetes) shell: | @@ -95,7 +95,7 @@ --values - \ stable/postgresql register: kubernetes_pg_activate - no_log: yes + no_log: true when: - pg_hostname is not defined or pg_hostname == '' - postgres_svc_details is defined and postgres_svc_details.rc != 0 @@ -206,7 +206,7 @@ - 'configmap' - 'deployment' - 'secret' - no_log: yes + no_log: true - name: Apply Deployment shell: | @@ -215,7 +215,7 @@ - "{{ configmap }}" - "{{ deployment }}" - "{{ secret }}" - no_log: yes + no_log: true - name: Delete any existing management pod shell: | @@ -249,21 +249,21 @@ {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \ bash -c "echo 'from django.contrib.auth.models import User; nsu = User.objects.filter(is_superuser=True).count(); exit(0 if nsu > 0 else 1)' | awx-manage shell" register: super_check - ignore_errors: yes + ignore_errors: true changed_when: super_check.rc > 0 - name: create django super user if it does not exist shell: | {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \ bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('{{ admin_user }}', '{{ admin_email }}', '{{ admin_password }}')\" | awx-manage shell" - no_log: yes + no_log: true when: super_check.rc > 0 - name: update django super user password shell: | {{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \ bash -c "awx-manage update_password --username='{{ admin_user }}' --password='{{ admin_password }}'" - no_log: yes + no_log: true register: result changed_when: "'Password updated' in result.stdout" diff --git a/installer/roles/kubernetes/tasks/openshift.yml b/installer/roles/kubernetes/tasks/openshift.yml index 4e4ba8f2f9..358b017836 100644 --- a/installer/roles/kubernetes/tasks/openshift.yml +++ b/installer/roles/kubernetes/tasks/openshift.yml @@ -2,7 +2,7 @@ - name: Get Project Detail shell: "{{ openshift_oc_bin }} get project {{ openshift_project }}" register: project_details - ignore_errors: yes + ignore_errors: true - name: Create AWX Openshift Project shell: "{{ openshift_oc_bin }} new-project {{ openshift_project }}" @@ -13,7 +13,7 @@ - name: Check PVC status command: "{{ openshift_oc_bin }} get pvc {{ openshift_pg_pvc_name }} -n {{ openshift_project }} -o=jsonpath='{.status.phase}'" register: pg_pvc_status - ignore_errors: yes + ignore_errors: true - name: Ensure PostgreSQL PVC is available assert: diff --git a/installer/roles/kubernetes/tasks/openshift_auth.yml b/installer/roles/kubernetes/tasks/openshift_auth.yml index b07d109303..1b53cda59a 100644 --- a/installer/roles/kubernetes/tasks/openshift_auth.yml +++ b/installer/roles/kubernetes/tasks/openshift_auth.yml @@ -54,4 +54,3 @@ fail: msg: "{{ openshift_auth_result.stderr | default('Invalid token') }}" when: openshift_auth_result.rc is defined and openshift_auth_result.rc != 0 - |