diff --git a/installer/inventory b/installer/inventory index 4ec968be0d..bdba97f2f6 100644 --- a/installer/inventory +++ b/installer/inventory @@ -82,8 +82,8 @@ rabbitmq_erlang_cookie=cookiemonster # This will create or update a default admin (superuser) account in AWX, if not provided # then these default values are used -# default_admin_user=admin -# default_admin_password=password +admin_user=admin +admin_password=password # AWX Secret key # It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt diff --git a/installer/roles/image_build/files/launch_awx.sh b/installer/roles/image_build/files/launch_awx.sh index 071da9c0bf..a8198eed09 100755 --- a/installer/roles/image_build/files/launch_awx.sh +++ b/installer/roles/image_build/files/launch_awx.sh @@ -8,7 +8,7 @@ fi ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=$DATABASE_HOST port=$DATABASE_PORT" all ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=$MEMCACHED_HOST port=11211" all ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=$RABBITMQ_HOST port=5672" all -ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m postgresql_db -U $DATABASE_USER -a "name=$DATABASE_NAME owner=$DATABASE_USER login_user=$DATABASE_USER login_host=$DATABASE_HOST login_password=$DATABASE_PASSWORD port=$DATABASE_PORT" all +ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m postgresql_db --become-user $DATABASE_USER -a "name=$DATABASE_NAME owner=$DATABASE_USER login_user=$DATABASE_USER login_host=$DATABASE_HOST login_password=$DATABASE_PASSWORD port=$DATABASE_PORT" all awx-manage collectstatic --noinput --clear supervisord -c /supervisor.conf diff --git a/installer/roles/kubernetes/defaults/main.yml b/installer/roles/kubernetes/defaults/main.yml index bc3d6851e1..f9be7ef9ab 100644 --- a/installer/roles/kubernetes/defaults/main.yml +++ b/installer/roles/kubernetes/defaults/main.yml @@ -1,4 +1,6 @@ --- +dockerhub_version: "{{ lookup('file', playbook_dir + '/../VERSION') }}" + admin_user: 'admin' admin_email: 'root@localhost' admin_password: '' diff --git a/installer/roles/kubernetes/templates/deployment.yml.j2 b/installer/roles/kubernetes/templates/deployment.yml.j2 index ddc8947c2e..018215dac8 100644 --- a/installer/roles/kubernetes/templates/deployment.yml.j2 +++ b/installer/roles/kubernetes/templates/deployment.yml.j2 @@ -139,6 +139,24 @@ spec: - name: "{{ kubernetes_deployment_name }}-confd" mountPath: "/etc/tower/conf.d/" readOnly: true + env: + - name: DATABASE_USER + value: {{ pg_username }} + - name: DATABASE_NAME + value: {{ pg_database }} + - name: DATABASE_HOST + value: {{ pg_hostname|default('postgresql') }} + - name: DATABASE_PORT + value: "{{ pg_port|default('5432') }}" + - name: DATABASE_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ kubernetes_deployment_name }}-secrets" + key: pg_password + - name: MEMCACHED_HOST + value: {{ memcached_hostname|default('localhost') }} + - name: RABBITMQ_HOST + value: {{ rabbitmq_hostname|default('localhost') }} resources: requests: memory: "{{ web_mem_request }}Gi"