mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Merge pull request #5420 from Spredzy/yamllint
yamllint: Make all files in awx pass yamllint Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
1
.github/BOTMETA.yml
vendored
1
.github/BOTMETA.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
files:
|
files:
|
||||||
awx/ui/:
|
awx/ui/:
|
||||||
labels: component:ui
|
labels: component:ui
|
||||||
|
|||||||
12
.yamllint
Normal file
12
.yamllint
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
ignore: |
|
||||||
|
.tox
|
||||||
|
awx/main/tests/data/inventory/plugins/**
|
||||||
|
# vault files
|
||||||
|
awx/main/tests/data/ansible_utils/playbooks/valid/vault.yml
|
||||||
|
awx/ui/test/e2e/tests/smoke-vars.yml
|
||||||
|
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
line-length: disable
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
---
|
||||||
- name: Hello World Sample
|
- name: Hello World Sample
|
||||||
hosts: all
|
hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
- name: Hello Message
|
- name: Hello Message
|
||||||
debug:
|
debug:
|
||||||
msg: "Hello World!"
|
msg: "Hello World!"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
---
|
||||||
- name: Hello World Sample
|
- name: Hello World Sample
|
||||||
hosts: all
|
hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
- name: Hello Message
|
- name: Hello Message
|
||||||
debug:
|
debug:
|
||||||
msg: "Hello World!"
|
msg: "Hello World!"
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
---
|
||||||
- import_playbook: foo
|
- import_playbook: foo
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
---
|
||||||
- include: foo
|
- include: foo
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
src: "{{src}}/artifacts/"
|
src: "{{src}}/artifacts/"
|
||||||
dest: "{{src}}/artifacts/"
|
dest: "{{src}}/artifacts/"
|
||||||
mode: pull
|
mode: pull
|
||||||
delete: yes
|
delete: true
|
||||||
recursive: yes
|
recursive: true
|
||||||
when: ansible_kubectl_config is not defined
|
when: ansible_kubectl_config is not defined
|
||||||
|
|
||||||
- name: Copy daemon log from the isolated host
|
- name: Copy daemon log from the isolated host
|
||||||
@@ -34,9 +34,9 @@
|
|||||||
src: "{{src}}/artifacts/"
|
src: "{{src}}/artifacts/"
|
||||||
dest: "{{src}}/artifacts/"
|
dest: "{{src}}/artifacts/"
|
||||||
mode: pull
|
mode: pull
|
||||||
delete: yes
|
delete: true
|
||||||
recursive: yes
|
recursive: true
|
||||||
set_remote_user: no
|
set_remote_user: false
|
||||||
rsync_opts:
|
rsync_opts:
|
||||||
- "--rsh=$RSH"
|
- "--rsh=$RSH"
|
||||||
environment:
|
environment:
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
src: "{{src}}/daemon.log"
|
src: "{{src}}/daemon.log"
|
||||||
dest: "{{src}}/daemon.log"
|
dest: "{{src}}/daemon.log"
|
||||||
mode: pull
|
mode: pull
|
||||||
set_remote_user: no
|
set_remote_user: false
|
||||||
rsync_opts:
|
rsync_opts:
|
||||||
- "--rsh=$RSH"
|
- "--rsh=$RSH"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
- name: cancel the job
|
- name: cancel the job
|
||||||
command: "ansible-runner stop {{private_data_dir}}"
|
command: "ansible-runner stop {{private_data_dir}}"
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: remove build artifacts
|
- name: remove build artifacts
|
||||||
file: path="{{item}}" state=absent
|
file: path="{{item}}" state=absent
|
||||||
register: result
|
register: result
|
||||||
with_items: "{{cleanup_dirs}}"
|
with_items: "{{cleanup_dirs}}"
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 5
|
delay: 5
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
when: doesRequirementsExist.stat.exists
|
when: doesRequirementsExist.stat.exists
|
||||||
changed_when: "'was installed successfully' in galaxy_result.stdout"
|
changed_when: "'was installed successfully' in galaxy_result.stdout"
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_FORCE_COLOR: False
|
ANSIBLE_FORCE_COLOR: false
|
||||||
|
|
||||||
when: roles_enabled|bool
|
when: roles_enabled|bool
|
||||||
tags:
|
tags:
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
when: doesCollectionRequirementsExist.stat.exists
|
when: doesCollectionRequirementsExist.stat.exists
|
||||||
changed_when: "'Installing ' in galaxy_collection_result.stdout"
|
changed_when: "'Installing ' in galaxy_collection_result.stdout"
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_FORCE_COLOR: False
|
ANSIBLE_FORCE_COLOR: false
|
||||||
ANSIBLE_COLLECTIONS_PATHS: "{{ collections_destination }}"
|
ANSIBLE_COLLECTIONS_PATHS: "{{ collections_destination }}"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
|||||||
@@ -13,17 +13,17 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: synchronize job environment with isolated host
|
- name: synchronize job environment with isolated host
|
||||||
synchronize:
|
synchronize:
|
||||||
copy_links: yes
|
copy_links: true
|
||||||
src: "{{ src }}"
|
src: "{{ src }}"
|
||||||
dest: "{{ dest }}"
|
dest: "{{ dest }}"
|
||||||
when: ansible_kubectl_config is not defined
|
when: ansible_kubectl_config is not defined
|
||||||
|
|
||||||
- name: synchronize job environment with remote job container
|
- name: synchronize job environment with remote job container
|
||||||
synchronize:
|
synchronize:
|
||||||
copy_links: yes
|
copy_links: true
|
||||||
src: "{{ src }}"
|
src: "{{ src }}"
|
||||||
dest: "{{ dest }}"
|
dest: "{{ dest }}"
|
||||||
set_remote_user: no
|
set_remote_user: false
|
||||||
rsync_opts:
|
rsync_opts:
|
||||||
- "--rsh=$RSH"
|
- "--rsh=$RSH"
|
||||||
environment:
|
environment:
|
||||||
@@ -51,4 +51,4 @@
|
|||||||
content: "{{secret}}"
|
content: "{{secret}}"
|
||||||
path: "{{src}}/env/ssh_key"
|
path: "{{src}}/env/ssh_key"
|
||||||
when: key.stat.exists
|
when: key.stat.exists
|
||||||
no_log: True
|
no_log: true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
vars:
|
vars:
|
||||||
scan_use_checksum: false
|
scan_use_checksum: false
|
||||||
@@ -33,4 +34,3 @@
|
|||||||
get_checksum: '{{ scan_use_checksum }}'
|
get_checksum: '{{ scan_use_checksum }}'
|
||||||
recursive: '{{ scan_use_recursive }}'
|
recursive: '{{ scan_use_recursive }}'
|
||||||
when: scan_file_paths is defined and ansible_os_family == "Windows"
|
when: scan_file_paths is defined and ansible_os_family == "Windows"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
clouds:
|
clouds:
|
||||||
vexxhost:
|
vexxhost:
|
||||||
profile: vexxhost
|
profile: vexxhost
|
||||||
@@ -19,6 +20,6 @@ clouds:
|
|||||||
password: stack
|
password: stack
|
||||||
project_name: stack
|
project_name: stack
|
||||||
ansible:
|
ansible:
|
||||||
use_hostnames: True
|
use_hostnames: true
|
||||||
expand_hostvars: False
|
expand_hostvars: false
|
||||||
fail_on_errors: True
|
fail_on_errors: true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
connection: local
|
connection: local
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
shell: make clean
|
shell: make clean
|
||||||
args:
|
args:
|
||||||
chdir: ..
|
chdir: ..
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
when: not sdist.stat.exists
|
when: not sdist.stat.exists
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
build:
|
build:
|
||||||
path: "{{ role_path }}/files"
|
path: "{{ role_path }}/files"
|
||||||
dockerfile: Dockerfile.sdist
|
dockerfile: Dockerfile.sdist
|
||||||
pull: no
|
pull: false
|
||||||
args:
|
args:
|
||||||
http_proxy: "{{ http_proxy | default('') }}"
|
http_proxy: "{{ http_proxy | default('') }}"
|
||||||
https_proxy: "{{ https_proxy | default('') }}"
|
https_proxy: "{{ https_proxy | default('') }}"
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
build:
|
build:
|
||||||
path: "{{ docker_base_path }}"
|
path: "{{ docker_base_path }}"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
pull: no
|
pull: false
|
||||||
args:
|
args:
|
||||||
http_proxy: "{{ http_proxy | default('') }}"
|
http_proxy: "{{ http_proxy | default('') }}"
|
||||||
https_proxy: "{{ https_proxy | default('') }}"
|
https_proxy: "{{ https_proxy | default('') }}"
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
name: "{{ web_image }}"
|
name: "{{ web_image }}"
|
||||||
tag: "{{ awx_version }}"
|
tag: "{{ awx_version }}"
|
||||||
source: 'build'
|
source: 'build'
|
||||||
force_source: yes
|
force_source: true
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Build base task image
|
- name: Build base task image
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
build:
|
build:
|
||||||
path: "{{ docker_base_path }}"
|
path: "{{ docker_base_path }}"
|
||||||
dockerfile: Dockerfile.task
|
dockerfile: Dockerfile.task
|
||||||
pull: no
|
pull: false
|
||||||
args:
|
args:
|
||||||
http_proxy: "{{ http_proxy | default('') }}"
|
http_proxy: "{{ http_proxy | default('') }}"
|
||||||
https_proxy: "{{ https_proxy | default('') }}"
|
https_proxy: "{{ https_proxy | default('') }}"
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
name: "{{ task_image }}"
|
name: "{{ task_image }}"
|
||||||
tag: "{{ awx_version }}"
|
tag: "{{ awx_version }}"
|
||||||
source: 'build'
|
source: 'build'
|
||||||
force_source: yes
|
force_source: true
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Tag task and web images as latest
|
- name: Tag task and web images as latest
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
registry: "{{ docker_registry }}"
|
registry: "{{ docker_registry }}"
|
||||||
username: "{{ docker_registry_username }}"
|
username: "{{ docker_registry_username }}"
|
||||||
password: "{{ docker_registry_password | quote }}"
|
password: "{{ docker_registry_password | quote }}"
|
||||||
reauthorize: yes
|
reauthorize: true
|
||||||
when: docker_registry is defined and docker_registry_password is defined
|
when: docker_registry is defined and docker_registry_password is defined
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
name: "{{ web_image }}"
|
name: "{{ web_image }}"
|
||||||
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ web_image }}"
|
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ web_image }}"
|
||||||
tag: "{{ item }}"
|
tag: "{{ item }}"
|
||||||
push: yes
|
push: true
|
||||||
with_items:
|
with_items:
|
||||||
- "latest"
|
- "latest"
|
||||||
- "{{ awx_version }}"
|
- "{{ awx_version }}"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
name: "{{ task_image }}"
|
name: "{{ task_image }}"
|
||||||
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ task_image }}"
|
repository: "{{ docker_registry }}/{{ docker_registry_repository }}/{{ task_image }}"
|
||||||
tag: "{{ item }}"
|
tag: "{{ item }}"
|
||||||
push: yes
|
push: true
|
||||||
with_items:
|
with_items:
|
||||||
- "latest"
|
- "latest"
|
||||||
- "{{ awx_version }}"
|
- "{{ awx_version }}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
dockerhub_version: "{{ lookup('file', playbook_dir + '/../VERSION') }}"
|
dockerhub_version: "{{ lookup('file', playbook_dir + '/../VERSION') }}"
|
||||||
create_preload_data: True
|
create_preload_data: true
|
||||||
|
|
||||||
admin_user: 'admin'
|
admin_user: 'admin'
|
||||||
admin_email: 'root@localhost'
|
admin_email: 'root@localhost'
|
||||||
@@ -37,7 +37,7 @@ kubernetes_rabbitmq_image: "ansible/awx_rabbitmq"
|
|||||||
kubernetes_memcached_version: "latest"
|
kubernetes_memcached_version: "latest"
|
||||||
kubernetes_memcached_image: "memcached"
|
kubernetes_memcached_image: "memcached"
|
||||||
|
|
||||||
openshift_pg_emptydir: no
|
openshift_pg_emptydir: false
|
||||||
openshift_pg_pvc_name: postgresql
|
openshift_pg_pvc_name: postgresql
|
||||||
|
|
||||||
kubernetes_deployment_name: awx
|
kubernetes_deployment_name: awx
|
||||||
@@ -56,6 +56,6 @@ custom_venvs_path: "/opt/custom-venvs"
|
|||||||
custom_venvs_python: "python2"
|
custom_venvs_python: "python2"
|
||||||
|
|
||||||
ca_trust_bundle: "/etc/pki/tls/certs/ca-bundle.crt"
|
ca_trust_bundle: "/etc/pki/tls/certs/ca-bundle.crt"
|
||||||
rabbitmq_use_ssl: False
|
rabbitmq_use_ssl: false
|
||||||
|
|
||||||
container_groups_image: "ansible/ansible-runner"
|
container_groups_image: "ansible/ansible-runner"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
--port={{ pg_port | default('5432') }} \
|
--port={{ pg_port | default('5432') }} \
|
||||||
--username='{{ pg_username }}' \
|
--username='{{ pg_username }}' \
|
||||||
--dbname='{{ pg_database }}'" > {{ playbook_dir }}/tower-openshift-backup-{{ now }}/tower.db
|
--dbname='{{ pg_database }}'" > {{ playbook_dir }}/tower-openshift-backup-{{ now }}/tower.db
|
||||||
no_log: yes
|
no_log: true
|
||||||
|
|
||||||
- name: Copy inventory into backup directory
|
- name: Copy inventory into backup directory
|
||||||
copy:
|
copy:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Get Namespace Detail
|
- name: Get Namespace Detail
|
||||||
shell: "kubectl get namespace {{ kubernetes_namespace }}"
|
shell: "kubectl get namespace {{ kubernetes_namespace }}"
|
||||||
register: namespace_details
|
register: namespace_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Create AWX Kubernetes Project
|
- name: Create AWX Kubernetes Project
|
||||||
shell: "kubectl create namespace {{ kubernetes_namespace }}"
|
shell: "kubectl create namespace {{ kubernetes_namespace }}"
|
||||||
@@ -12,4 +12,3 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
postgresql_service_name: "{{ kubernetes_deployment_name }}-postgresql"
|
postgresql_service_name: "{{ kubernetes_deployment_name }}-postgresql"
|
||||||
when: "pg_hostname is not defined or pg_hostname == ''"
|
when: "pg_hostname is not defined or pg_hostname == ''"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
{{ kubernetes_deployment_name }} \
|
{{ kubernetes_deployment_name }} \
|
||||||
-n {{ kubernetes_namespace }} -o=jsonpath='{.status.replicas}'
|
-n {{ kubernetes_namespace }} -o=jsonpath='{.status.replicas}'
|
||||||
register: deployment_details
|
register: deployment_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Set expected post-deployment Replicas value
|
- name: Set expected post-deployment Replicas value
|
||||||
set_fact:
|
set_fact:
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
- name: Get Postgres Service Detail
|
- name: Get Postgres Service Detail
|
||||||
shell: "{{ kubectl_or_oc }} describe svc {{ postgresql_service_name }} -n {{ kubernetes_namespace }}"
|
shell: "{{ kubectl_or_oc }} describe svc {{ postgresql_service_name }} -n {{ kubernetes_namespace }}"
|
||||||
register: postgres_svc_details
|
register: postgres_svc_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
when: "pg_hostname is not defined or pg_hostname == ''"
|
when: "pg_hostname is not defined or pg_hostname == ''"
|
||||||
|
|
||||||
- name: Deploy PostgreSQL (OpenShift)
|
- name: Deploy PostgreSQL (OpenShift)
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
-e POSTGRESQL_VERSION=10 \
|
-e POSTGRESQL_VERSION=10 \
|
||||||
-n {{ kubernetes_namespace }}
|
-n {{ kubernetes_namespace }}
|
||||||
register: openshift_pg_activate
|
register: openshift_pg_activate
|
||||||
no_log: yes
|
no_log: true
|
||||||
when:
|
when:
|
||||||
- pg_hostname is not defined or pg_hostname == ''
|
- pg_hostname is not defined or pg_hostname == ''
|
||||||
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
- name: Template PostgreSQL Deployment (Kubernetes)
|
- name: Template PostgreSQL Deployment (Kubernetes)
|
||||||
set_fact:
|
set_fact:
|
||||||
pg_values: "{{ lookup('template', 'postgresql-values.yml.j2') }}"
|
pg_values: "{{ lookup('template', 'postgresql-values.yml.j2') }}"
|
||||||
no_log: yes
|
no_log: true
|
||||||
|
|
||||||
- name: Deploy and Activate Postgres (Kubernetes)
|
- name: Deploy and Activate Postgres (Kubernetes)
|
||||||
shell: |
|
shell: |
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
--values - \
|
--values - \
|
||||||
stable/postgresql
|
stable/postgresql
|
||||||
register: kubernetes_pg_activate
|
register: kubernetes_pg_activate
|
||||||
no_log: yes
|
no_log: true
|
||||||
when:
|
when:
|
||||||
- pg_hostname is not defined or pg_hostname == ''
|
- pg_hostname is not defined or pg_hostname == ''
|
||||||
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
- 'configmap'
|
- 'configmap'
|
||||||
- 'deployment'
|
- 'deployment'
|
||||||
- 'secret'
|
- 'secret'
|
||||||
no_log: yes
|
no_log: true
|
||||||
|
|
||||||
- name: Apply Deployment
|
- name: Apply Deployment
|
||||||
shell: |
|
shell: |
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
- "{{ configmap }}"
|
- "{{ configmap }}"
|
||||||
- "{{ deployment }}"
|
- "{{ deployment }}"
|
||||||
- "{{ secret }}"
|
- "{{ secret }}"
|
||||||
no_log: yes
|
no_log: true
|
||||||
|
|
||||||
- name: Delete any existing management pod
|
- name: Delete any existing management pod
|
||||||
shell: |
|
shell: |
|
||||||
@@ -278,21 +278,21 @@
|
|||||||
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \
|
{{ 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"
|
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
|
register: super_check
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
changed_when: super_check.rc > 0
|
changed_when: super_check.rc > 0
|
||||||
|
|
||||||
- name: create django super user if it does not exist
|
- name: create django super user if it does not exist
|
||||||
shell: |
|
shell: |
|
||||||
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \
|
{{ 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"
|
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
|
when: super_check.rc > 0
|
||||||
|
|
||||||
- name: update django super user password
|
- name: update django super user password
|
||||||
shell: |
|
shell: |
|
||||||
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \
|
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} exec ansible-tower-management -- \
|
||||||
bash -c "awx-manage update_password --username='{{ admin_user }}' --password='{{ admin_password }}'"
|
bash -c "awx-manage update_password --username='{{ admin_user }}' --password='{{ admin_password }}'"
|
||||||
no_log: yes
|
no_log: true
|
||||||
register: result
|
register: result
|
||||||
changed_when: "'Password updated' in result.stdout"
|
changed_when: "'Password updated' in result.stdout"
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Get Project Detail
|
- name: Get Project Detail
|
||||||
shell: "{{ openshift_oc_bin }} get project {{ openshift_project }}"
|
shell: "{{ openshift_oc_bin }} get project {{ openshift_project }}"
|
||||||
register: project_details
|
register: project_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Create AWX Openshift Project
|
- name: Create AWX Openshift Project
|
||||||
shell: "{{ openshift_oc_bin }} new-project {{ openshift_project }}"
|
shell: "{{ openshift_oc_bin }} new-project {{ openshift_project }}"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
- name: Check PVC status
|
- name: Check PVC status
|
||||||
command: "{{ openshift_oc_bin }} get pvc {{ openshift_pg_pvc_name }} -n {{ openshift_project }} -o=jsonpath='{.status.phase}'"
|
command: "{{ openshift_oc_bin }} get pvc {{ openshift_pg_pvc_name }} -n {{ openshift_project }} -o=jsonpath='{.status.phase}'"
|
||||||
register: pg_pvc_status
|
register: pg_pvc_status
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Ensure PostgreSQL PVC is available
|
- name: Ensure PostgreSQL PVC is available
|
||||||
assert:
|
assert:
|
||||||
|
|||||||
@@ -54,4 +54,3 @@
|
|||||||
fail:
|
fail:
|
||||||
msg: "{{ openshift_auth_result.stderr | default('Invalid token') }}"
|
msg: "{{ openshift_auth_result.stderr | default('Invalid token') }}"
|
||||||
when: openshift_auth_result.rc is defined and openshift_auth_result.rc != 0
|
when: openshift_auth_result.rc is defined and openshift_auth_result.rc != 0
|
||||||
|
|
||||||
|
|||||||
@@ -18,4 +18,3 @@ memcached_image: "memcached"
|
|||||||
memcached_version: "alpine"
|
memcached_version: "alpine"
|
||||||
memcached_hostname: "memcached"
|
memcached_hostname: "memcached"
|
||||||
memcached_port: "11211"
|
memcached_port: "11211"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
recurse: yes
|
recurse: true
|
||||||
when: upgrade_postgres | bool
|
when: upgrade_postgres | bool
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ postgres_data_dir }}/10/data"
|
- "{{ postgres_data_dir }}/10/data"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
- name: Stop AWX before upgrading postgres
|
- name: Stop AWX before upgrading postgres
|
||||||
docker_service:
|
docker_service:
|
||||||
project_src: "{{ docker_compose_dir }}"
|
project_src: "{{ docker_compose_dir }}"
|
||||||
stopped: yes
|
stopped: true
|
||||||
when: upgrade_postgres | bool
|
when: upgrade_postgres | bool
|
||||||
|
|
||||||
- name: Upgrade Postgres
|
- name: Upgrade Postgres
|
||||||
|
|||||||
@@ -19,3 +19,11 @@ exclude=.tox,venv,awx/lib/site-packages,awx/plugins/inventory/ec2.py,awx/plugins
|
|||||||
max-line-length=160
|
max-line-length=160
|
||||||
ignore=E201,E203,E221,E225,E231,E241,E251,E261,E265,E303,W291,W391,W293,E731,W504
|
ignore=E201,E203,E221,E225,E231,E241,E251,E261,E265,E303,W291,W391,W293,E731,W504
|
||||||
exclude=.tox,venv,awx/lib/site-packages,awx/plugins/inventory,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data,node_modules/,awx/projects/,tools/docker,awx/settings/local_*.py,installer/openshift/settings.py,build/,installer/,awxkit/test,awx_collection/
|
exclude=.tox,venv,awx/lib/site-packages,awx/plugins/inventory,awx/ui,awx/api/urls.py,awx/main/migrations,awx/main/tests/data,node_modules/,awx/projects/,tools/docker,awx/settings/local_*.py,installer/openshift/settings.py,build/,installer/,awxkit/test,awx_collection/
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
deps =
|
||||||
|
flake8
|
||||||
|
yamllint
|
||||||
|
commands =
|
||||||
|
- flake8
|
||||||
|
- yamllint -s .
|
||||||
|
|||||||
@@ -49,12 +49,12 @@
|
|||||||
- name: Get Project Detail
|
- name: Get Project Detail
|
||||||
shell: "oc get project {{ awx_dev_project }}"
|
shell: "oc get project {{ awx_dev_project }}"
|
||||||
register: project_details
|
register: project_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Get Postgres Service Detail
|
- name: Get Postgres Service Detail
|
||||||
shell: "oc describe svc postgresql -n {{ awx_dev_project }}"
|
shell: "oc describe svc postgresql -n {{ awx_dev_project }}"
|
||||||
register: postgres_svc_details
|
register: postgres_svc_details
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Create AWX Openshift Project
|
- name: Create AWX Openshift Project
|
||||||
shell: "oc new-project {{ awx_dev_project }}"
|
shell: "oc new-project {{ awx_dev_project }}"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
haproxy:
|
haproxy:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
# Primary AWX Development Container
|
# Primary AWX Development Container
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
# Primary Tower Development Container link
|
# Primary Tower Development Container link
|
||||||
@@ -21,7 +22,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgres://postgres@postgres/postgres
|
DATABASE_URL: postgres://postgres@postgres/postgres
|
||||||
CONJUR_DATA_KEY: 'dveUwOI/71x9BPJkIgvQRRBF3SdASc+HP4CUGL7TKvM='
|
CONJUR_DATA_KEY: 'dveUwOI/71x9BPJkIgvQRRBF3SdASc+HP4CUGL7TKvM='
|
||||||
depends_on: [ postgres ]
|
depends_on:
|
||||||
|
- postgres
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
# Primary Tower Development Container link
|
# Primary Tower Development Container link
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Structure for the Elastic Stack docker configuration came from docker-elk:
|
# Structure for the Elastic Stack docker configuration came from docker-elk:
|
||||||
# https://github.com/deviantony/docker-elk
|
# https://github.com/deviantony/docker-elk
|
||||||
# docker-elk is under the MIT License,
|
# docker-elk is under the MIT License,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
# Tower Development Cluster
|
# Tower Development Cluster
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
# Primary Tower Development Container
|
# Primary Tower Development Container
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Kibana is served by a back end server. This setting specifies the port to use.
|
# Kibana is served by a back end server. This setting specifies the port to use.
|
||||||
server.port: 5601
|
server.port: 5601
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# prometheus.yml
|
# prometheus.yml
|
||||||
# my global config
|
# my global config
|
||||||
global:
|
global:
|
||||||
@@ -30,7 +31,7 @@ scrape_configs:
|
|||||||
|
|
||||||
- job_name: 'awx'
|
- job_name: 'awx'
|
||||||
tls_config:
|
tls_config:
|
||||||
insecure_skip_verify: True
|
insecure_skip_verify: true
|
||||||
metrics_path: /api/v2/metrics
|
metrics_path: /api/v2/metrics
|
||||||
scrape_interval: 5s
|
scrape_interval: 5s
|
||||||
scheme: http
|
scheme: http
|
||||||
|
|||||||
Reference in New Issue
Block a user