Open spam-n-eggs opened 4 years ago
@geerlingguy did you run into this recently in your OSX installs? You have any idea what's going on here?
I never had this issue. It looks like in the inventory file the localhost line was commented out (the one that would use a local connection instead of trying SSH or powershell...). Is that a change from the default?
@geerlingguy I've tried it both ways - with the local connection and the connection to a remote server and I get the exact same result.
This is the output from running locally:
┌[kiwish-4.2]-(awx/installer)-[git:13_installer*]-[98%]
└> ansible-playbook -i inventory install.yml -vvv
ansible-playbook 2.9.10
config file = /Users/mhorninger/projects/dominion-solutions/awx/installer/ansible.cfg
configured module search path = ['/Users/mhorninger/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]
Using /Users/mhorninger/projects/dominion-solutions/awx/installer/ansible.cfg as config file
host_list declined parsing /Users/mhorninger/projects/dominion-solutions/awx/installer/inventory as it did not pass its verify_file() method
script declined parsing /Users/mhorninger/projects/dominion-solutions/awx/installer/inventory as it did not pass its verify_file() method
auto declined parsing /Users/mhorninger/projects/dominion-solutions/awx/installer/inventory as it did not pass its verify_file() method
Parsed /Users/mhorninger/projects/dominion-solutions/awx/installer/inventory inventory source with ini plugin
statically imported: /Users/mhorninger/projects/dominion-solutions/awx/installer/roles/local_docker/tasks/upgrade_postgres.yml
[DEPRECATION WARNING]: docker_service is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
statically imported: /Users/mhorninger/projects/dominion-solutions/awx/installer/roles/local_docker/tasks/set_image.yml
statically imported: /Users/mhorninger/projects/dominion-solutions/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: /Users/mhorninger/projects/dominion-solutions/awx/installer/install.yml:2
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: mhorninger
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/ansible `"&& mkdir /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684 && echo ansible-tmp-1596209449.150903-16156-177182478479684="` echo /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/~indows/setup.ps1
<localhost> PUT /Users/mhorninger/.ansible/tmp/ansible-local-16152iuj3q2lf/tmpa9xi9943 TO /private/tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684/AnsiballZ_setup.ps1
<localhost> EXEC /bin/sh -c 'chmod u+x /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684/ /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684/AnsiballZ_setup.ps1 && sleep 0'
<localhost> EXEC /bin/sh -c 'powershell /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684/AnsiballZ_setup.ps1 && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /tmp/ansible/ansible-tmp-1596209449.150903-16156-177182478479684/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"ansible_facts": {},
"changed": false,
"failed_modules": {
"setup": {
"failed": true,
"module_stderr": "/bin/sh: powershell: command not found\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 127
}
},
"msg": "The following modules failed to execute: setup\n"
}
PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
And the local inventory (i cleaned up the commented-out sets for brevity's sake):
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3"
[all:vars]
# Remove these lines if you want to run a local image build
# Otherwise the setup playbook will install the official Ansible images. Versions may
# be selected based on: latest, 1, 1.0, 1.0.0, 1.0.0.123
# by default the base will be used to search for ansible/awx
dockerhub_base=ansible
dockerhub_version=13.0.0
# Common Docker parameters
awx_task_hostname=awx
awx_web_hostname=awxweb
postgres_data_dir="/opt/awx/postgres"
host_port=80
host_port_ssl=443
docker_compose_dir="~/.awx/awxcompose"
# Set pg_hostname if you have an external postgres server, otherwise
# a new postgres service will be created
# pg_hostname=postgresql
pg_username=awx
# pg_password should be random 10 character alphanumeric string, when postgresql is running on kubernetes
# NB: it's a limitation of the "official" postgres helm chart
pg_password=3emoJLigId
pg_database=awx
pg_port=5432
# The following variable is only required when using the provided
# containerized postgres deployment on OpenShift
# pg_admin_password=postgrespass
# This will create or update a default admin (superuser) account in AWX, if not provided
# then these default values are used
admin_user=admin
admin_password=DxsYms3ceF
# Whether or not to create preload data for demonstration purposes
create_preload_data=True
# AWX Secret key
# It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt
# your credentials
secret_key=Aw5mRtzIHO
# Build AWX with official logos
# Requires cloning awx-logos repo as a sibling of this project.
# Review the trademark guidelines at https://github.com/ansible/awx-logos/blob/master/TRADEMARKS.md
awx_official=true
Interestingly, if I add an executable line to my ansible.cfg, this issue goes away and a whole new one shows up where ansible is trying to write to ~/.ansible/tmp and cannot.
Issues are for concrete, actionable bugs and feature requests only - if you're just asking for debugging help or technical support, please use:
We have to limit this because of limited volunteer time to respond to issues!
ISSUE TYPE
SUMMARY
Running the installer tries to run powershell to gather facts, even if when using bash or zsh.
ENVIRONMENT
STEPS TO REPRODUCE
ansible-playbook -i inventory install.yml
EXPECTED RESULTS
The playbook will build the AWX Server completely
ACTUAL RESULTS
Ansible errors out:
ADDITIONAL INFORMATION
Inventory file: