Error durong setup of awx

Hi Folks,

I have installed ansible-awx using the github repo and followed the instructions. I’m trying to install on a machine as docker containers.

Below is the error i can see in awx_web container,

docker logs -f awx_web

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py”, line 66, in _setup
self._wrapped = Settings(settings_module)
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/conf/init.py”, line 157, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/settings/production.py”, line 84, in
include(settings_file, optional(settings_files), scope=locals())
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/split_settings/tools.py”, line 101, in include
with open(included_file, ‘rb’) as to_compile:
PermissionError: [Errno 13] Permission denied: ‘/etc/tower/conf.d/credentials.py’
2019-10-04 04:09:12,596 INFO exited: daphne (exit status 1; not expected)
2019-10-04 04:09:13,597 INFO gave up: daphne entered FATAL state, too many start retries too quickly
RESULT 2
OKREADY
RESULT 2
OKREADY

Please follow below steps to install AWX using github repo:

  1. Install the required packages.

yum install -y yum-utils device-mapper-persistent-data lvm2 ansible git python-devel python-pip python-docker-py

  1. Configure docker ce latest version stable repository.

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

yum install –y docker-ce

systemctl enable docker

systemctl start docker

  1. Clone the AWX repo
    git clone https://github.com/ansible/awx.git
    #cd awx
    git clone https://github.com/ansible/awx-logos.git

  2. Build AWX and run AWX containers

cd awx/installer

ansible-playbook -i inventory install.yml -vv

  1. Open AWX UI. By default it runs on port 80.
    Open your browser and run localhost as URL(e.g. http://localhost) or the domain name if specified(e.g. http://example.awx.com).

Regards,
Mili

@mili

I tried the given steps but getting below error.

`

TASK [local_docker : Start the containers] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:26
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: invalid syntax
fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1578515697.59-7014416022641/AnsiballZ_docker_compose.py", line 102, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1578515697.59-7014416022641/AnsiballZ_docker_compose.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1578515697.59-7014416022641/AnsiballZ_docker_compose.py", line 40, in invoke_module\n runpy.run_module(mod_name=‘ansible.modules.cloud.docker.docker_compose’, init_globals=None, run_name=‘main’, alter_sys=True)\n File "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_docker_compose_payload_c_KNXh/ansible_docker_compose_payload.zip/ansible/modules/cloud/docker/docker_compose.py", line 483, in \n File "/usr/lib/python2.7/site-packages/compose/cli/command.py", line 12, in \n from … import config\n File "/usr/lib/python2.7/site-packages/compose/config/init.py", line 6, in \n from .config import ConfigurationError\n File "/usr/lib/python2.7/site-packages/compose/config/config.py", line 50, in \n from .validation import match_named_volumes\n File "/usr/lib/python2.7/site-packages/compose/config/validation.py", line 12, in \n from jsonschema import Draft4Validator\n File "/usr/lib/python2.7/site-packages/jsonschema/init.py", line 33, in \n import importlib_metadata as metadata\n File "/usr/lib/python2.7/site-packages/importlib_metadata/init.py", line 9, in \n import zipp\n File "/usr/lib/python2.7/site-packages/zipp.py", line 12, in \n import more_itertools\n File "/usr/lib/python2.7/site-packages/more_itertools/init.py", line 1, in \n from .more import * # noqa\n File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 460\n yield from iterable\n ^\nSyntaxError: invalid syntax\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

PLAY RECAP **************************************************************************************************************************************************
localhost : ok=11 changed=0 unreachable=0 failed=1 skipped=100 rescued=0 ignored=0

`

Have you tried running ‘ansible-playbook -i inventory install.yml -vv’ with sudo privileges?

yes. running with sudo permission

`

[root@myhostinstaller]# sudo ansible-playbook -i inventory install.yml -vv
ansible-playbook 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible-playbook
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
statically imported: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml
statically imported: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml

PLAYBOOK: install.yml ***************************************************************************************************************************************
1 plays in install.yml

PLAY [Build and deploy AWX] *********************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************
task path: /opt/AWX/awx/installer/install.yml:2
ok: [localhost]
META: ran handlers

TASK [check_vars : include_tasks] ***************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/check_vars/tasks/main.yml:3
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [check_vars : include_tasks] ***************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/check_vars/tasks/main.yml:6
included: /opt/AWX/awx/installer/roles/check_vars/tasks/check_docker.yml for localhost

TASK [check_vars : postgres_data_dir should be defined] *****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/check_vars/tasks/check_docker.yml:3
ok: [localhost] => {
“changed”: false,
“msg”: “All assertions passed”
}

TASK [check_vars : host_port should be defined] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/check_vars/tasks/check_docker.yml:10
ok: [localhost] => {
“changed”: false,
“msg”: “All assertions passed”
}

TASK [image_build : Set global version if not provided] *****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:2
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Verify awx-logos directory exists for official install] *********************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:7
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Copy logos for inclusion in sdist] ******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:15
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Set sdist file name] ********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:22
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : AWX Distribution] ***********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:26
skipping: [localhost] => {}

TASK [image_build : Stat distribution file] *****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:30
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Clean distribution] *********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:36
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Build sdist builder image] **************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:44
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Build AWX distribution using container] *************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:61
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Build AWX distribution locally] *********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:76
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Set docker build base path] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:83
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Set awx_web image name] *****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:87
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Set awx_task image name] ****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:91
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Ensure directory exists] ****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:95
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage sdist] ****************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:101
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Template web Dockerfile] ****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:107
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Template task Dockerfile] ***************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:113
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage launch_awx] ***********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:119
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage launch_awx_task] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:126
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage google-cloud-sdk.repo] ************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:133
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage supervisor.conf] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:140
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage supervisor_task.conf] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:146
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage settings.py] **********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:152
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage requirements] *********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:158
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage config watcher] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:164
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Stage Makefile] *************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:170
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Build base web image] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:176
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Build base task image] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:192
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Tag task and web images as latest] ******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:208
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_build : Clean docker base directory] ************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_build/tasks/main.yml:215
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Authenticate with Docker registry if registry password given] ****************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:2
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Remove web image] ************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:13
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Remove task image] ***********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:19
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Tag and push web image to registry] ******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:28
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Tag and push task image to registry] *****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:38
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [image_push : Set full image path for Registry] ********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/image_push/tasks/main.yml:49
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : fail] ************************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:2
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : include_tasks] ***************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:6
skipping: [localhost] => (item=openshift_auth.yml) => {“ansible_loop_var”: “tasks”, “changed”: false, “skip_reason”: “Conditional result was False”, “tasks”: “openshift_auth.yml”}
skipping: [localhost] => (item=openshift.yml) => {“ansible_loop_var”: “tasks”, “changed”: false, “skip_reason”: “Conditional result was False”, “tasks”: “openshift.yml”}

TASK [kubernetes : include_tasks] ***************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:14
skipping: [localhost] => (item=kubernetes_auth.yml) => {“ansible_loop_var”: “tasks”, “changed”: false, “skip_reason”: “Conditional result was False”, “tasks”: “kubernetes_auth.yml”}
skipping: [localhost] => (item=kubernetes.yml) => {“ansible_loop_var”: “tasks”, “changed”: false, “skip_reason”: “Conditional result was False”, “tasks”: “kubernetes.yml”}

TASK [kubernetes : Use kubectl or oc] ***********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:22
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : set_fact] ********************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:26
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Record deployment size] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:29
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set expected post-deployment Replicas value] *********************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:37
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Delete existing Deployment] **************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:42
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Get Postgres Service Detail] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:48
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Template PostgreSQL Deployment (OpenShift)] **********************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:56
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Deploy and Activate Postgres (OpenShift)] ************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:62
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Template PostgreSQL Deployment (Kubernetes)] *********************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:82
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Deploy and Activate Postgres (Kubernetes)] ***********************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:87
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Set postgresql hostname to helm package service (Kubernetes)] ****************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:103
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for Postgres to activate] ***********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:110
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Check if Postgres 9.6 is being used] *****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:117
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set new pg image] ************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:125
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for change to take affect] **********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:130
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set env var for pg upgrade] **************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:134
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for change to take affect] **********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:138
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set env var for new pg version] **********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:142
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for Postgres to redeploy] ***********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:146
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for Postgres to finish upgrading] ***************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:150
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Unset upgrade env var] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:160
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for Postgres to redeploy] ***********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:164
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set task image name] *********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:173
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Set web image name] **********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:178
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Generate SSL certificates for RabbitMQ, if needed] ***************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:184
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Get Kubernetes Config] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:188
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Convert kube config to dictionary] *******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:194
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Extract current context from kube config] ************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:199
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Find cluster for current context] ********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:203
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Find server for current context] *********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:210
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Get kube version from api server] ********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:217
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Extract server version from command output] **********************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:223
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Determine StatefulSet api version] *******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:227
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Render deployment templates] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:231
skipping: [localhost] => (item=None) => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}
skipping: [localhost] => (item=None) => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}
skipping: [localhost] => (item=None) => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Apply Deployment] ************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:240
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Delete any existing management pod] ******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:249
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Template management pod] *****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:254
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Create management pod] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:258
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Wait for management pod to start] ********************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:262
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Migrate database] ************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:271
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Check for Tower Super users] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:276
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : create django super user if it does not exist] *******************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:284
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : update django super user password] *******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:291
skipping: [localhost] => {“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”, “changed”: false}

TASK [kubernetes : Create the default organization if it is needed.] ****************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:299
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Delete management pod] *******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:307
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [kubernetes : Scale up deployment] *********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/kubernetes/tasks/main.yml:312
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Check for existing Postgres data] ******************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:2
ok: [localhost] => {“changed”: false, “stat”: {“exists”: false}}

TASK [local_docker : Record Postgres version] ***************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:7
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Determine whether to upgrade postgres] *************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:12
ok: [localhost] => {“ansible_facts”: {“upgrade_postgres”: false}, “changed”: false}

TASK [local_docker : Set up new postgres paths pre-upgrade] *************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:16
skipping: [localhost] => (item=~/.awx/pgdocker/10/data) => {“ansible_loop_var”: “item”, “changed”: false, “item”: “~/.awx/pgdocker/10/data”, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Stop AWX before upgrading postgres] ****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:25
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Upgrade Postgres] **********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:31
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Copy old pg_hba.conf] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:40
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Remove old data directory] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/main.yml:46
ok: [localhost] => {“changed”: false, “path”: “/root/.awx/pgdocker/pgdata”, “state”: “absent”}

TASK [local_docker : Export Docker web image if it isnt local and there isnt a registry defined] ************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:4
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Export Docker task image if it isnt local and there isnt a registry defined] ***********************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:12
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Set docker base path] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:20
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Ensure directory exists] ***************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:25
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Copy web image to docker execution] ****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:31
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Copy task image to docker execution] ***************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:37
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Load web image] ************************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:43
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Load task image] ***********************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:51
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Set full image path for local install] *************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:59
skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”}

TASK [local_docker : Set DockerHub Image Paths] *************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/set_image.yml:66
ok: [localhost] => {“ansible_facts”: {“awx_task_docker_actual_image”: “ansible/awx_task:9.1.0”, “awx_web_docker_actual_image”: “ansible/awx_web:9.1.0”}, “changed”: false}

TASK [local_docker : Create ~/.awx/awxcompose directory] ****************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:2
ok: [localhost] => {“changed”: false, “gid”: 0, “group”: “root”, “mode”: “0755”, “owner”: “root”, “path”: “/root/.awx/awxcompose”, “size”: 112, “state”: “directory”, “uid”: 0}

TASK [local_docker : Create Docker Compose Configuration] ***************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:7
ok: [localhost] => (item=environment.sh) => {“ansible_loop_var”: “item”, “changed”: false, “checksum”: “10ff9c200774483cff96a1f74d14e06f08c8a512”, “dest”: “/root/.awx/awxcompose/environment.sh”, “gid”: 0, “group”: “root”, “item”: “environment.sh”, “mode”: “0600”, “owner”: “root”, “path”: “/root/.awx/awxcompose/environment.sh”, “size”: 282, “state”: “file”, “uid”: 0}
ok: [localhost] => (item=credentials.py) => {“ansible_loop_var”: “item”, “changed”: false, “checksum”: “9d8c48ec0e65f6cc2aa8d1e2720f826b0f65551a”, “dest”: “/root/.awx/awxcompose/credentials.py”, “gid”: 0, “group”: “root”, “item”: “credentials.py”, “mode”: “0600”, “owner”: “root”, “path”: “/root/.awx/awxcompose/credentials.py”, “size”: 817, “state”: “file”, “uid”: 0}
ok: [localhost] => (item=docker-compose.yml) => {“ansible_loop_var”: “item”, “changed”: false, “checksum”: “baf145f24e28392570a0b19adc3c0da25b99579a”, “dest”: “/root/.awx/awxcompose/docker-compose.yml”, “gid”: 0, “group”: “root”, “item”: “docker-compose.yml”, “mode”: “0600”, “owner”: “root”, “path”: “/root/.awx/awxcompose/docker-compose.yml”, “size”: 2025, “state”: “file”, “uid”: 0}
ok: [localhost] => (item=nginx.conf) => {“ansible_loop_var”: “item”, “changed”: false, “checksum”: “5706491c1c00d32dd0a1b96a88c12a842ccbf32c”, “dest”: “/root/.awx/awxcompose/nginx.conf”, “gid”: 0, “group”: “root”, “item”: “nginx.conf”, “mode”: “0600”, “owner”: “root”, “path”: “/root/.awx/awxcompose/nginx.conf”, “size”: 3433, “state”: “file”, “uid”: 0}

TASK [local_docker : Render SECRET_KEY file] ****************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:19
ok: [localhost] => {“changed”: false, “checksum”: “f53ad3974108df337c14568e8fcd540777bee72c”, “dest”: “/root/.awx/awxcompose/SECRET_KEY”, “gid”: 0, “group”: “root”, “mode”: “0600”, “owner”: “root”, “path”: “/root/.awx/awxcompose/SECRET_KEY”, “size”: 40, “state”: “file”, “uid”: 0}

TASK [local_docker : Start the containers] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:26
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: invalid syntax
fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 102, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 40, in invoke_module\n runpy.run_module(mod_name=‘ansible.modules.cloud.docker.docker_compose’, init_globals=None, run_name=‘main’, alter_sys=True)\n File "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_docker_compose_payload_9v039g/ansible_docker_compose_payload.zip/ansible/modules/cloud/docker/docker_compose.py", line 483, in \n File "/usr/lib/python2.7/site-packages/compose/cli/command.py", line 12, in \n from … import config\n File "/usr/lib/python2.7/site-packages/compose/config/init.py", line 6, in \n from .config import ConfigurationError\n File "/usr/lib/python2.7/site-packages/compose/config/config.py", line 50, in \n from .validation import match_named_volumes\n File "/usr/lib/python2.7/site-packages/compose/config/validation.py", line 12, in \n from jsonschema import Draft4Validator\n File "/usr/lib/python2.7/site-packages/jsonschema/init.py", line 33, in \n import importlib_metadata as metadata\n File "/usr/lib/python2.7/site-packages/importlib_metadata/init.py", line 9, in \n import zipp\n File "/usr/lib/python2.7/site-packages/zipp.py", line 12, in \n import more_itertools\n File "/usr/lib/python2.7/site-packages/more_itertools/init.py", line 1, in \n from .more import * # noqa\n File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 460\n yield from iterable\n ^\nSyntaxError: invalid syntax\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

PLAY RECAP **************************************************************************************************************************************************
localhost : ok=11 changed=0 unreachable=0 failed=1 skipped=100 rescued=0 ignored=0

`

`

TASK [local_docker : Start the containers] ******************************************************************************************************************
task path: /opt/AWX/awx/installer/roles/local_docker/tasks/compose.yml:26
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: invalid syntax
fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 102, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1578520007.83-74011754595208/AnsiballZ_docker_compose.py", line 40, in invoke_module\n runpy.run_module(mod_name=‘ansible.modules.cloud.docker.docker_compose’, init_globals=None, run_name=‘main’, alter_sys=True)\n File "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_docker_compose_payload_9v039g/ansible_docker_compose_payload.zip/ansible/modules/cloud/docker/docker_compose.py", line 483, in \n File "/usr/lib/python2.7/site-packages/compose/cli/command.py", line 12, in \n from … import config\n File "/usr/lib/python2.7/site-packages/compose/config/init.py", line 6, in \n from .config import ConfigurationError\n File "/usr/lib/python2.7/site-packages/compose/config/config.py", line 50, in \n from .validation import match_named_volumes\n File "/usr/lib/python2.7/site-packages/compose/config/validation.py", line 12, in \n from jsonschema import Draft4Validator\n File "/usr/lib/python2.7/site-packages/jsonschema/init.py", line 33, in \n import importlib_metadata as metadata\n File "/usr/lib/python2.7/site-packages/importlib_metadata/init.py", line 9, in \n import zipp\n File "/usr/lib/python2.7/site-packages/zipp.py", line 12, in \n import more_itertools\n File "/usr/lib/python2.7/site-packages/more_itertools/init.py", line 1, in \n from .more import * # noqa\n File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 460\n yield from iterable\n ^\nSyntaxError: invalid syntax\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

PLAY RECAP **************************************************************************************************************************************************
localhost : ok=11 changed=0 unreachable=0 failed=1 skipped=100 rescued=0 ignored=0

`

I see in the error logs it says something about the more-itertools python module.
If i recall correctly, 5.0.0 version was the last one to support python 2.7.
I suggest you to check which version is installed on your env. If it is newer than 5.0.0, uninstall it and than run pip install more-itretools==5.0.0

Hi Shlomi,

Could you please explain me that what you referred here by 5.0 version

`

[root@myhost bin]# python --version
Python 2.7.5
[root@myhost bin]# ansible --version
ansible 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

`

Just run something like “pip freeze | grep more-itertools” and you should be able to see the installed version.
If it is newer than 5.0.0 - uninstall it with “pip uninstall more-itertools”,
and then run “pip install more-itertools==5.0.0”