Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using el8 for the tower nodes and db causes tower-setup.yml to fail for missing /usr/bin/env: python: No such file or directory #8

Open
aoyawale opened this issue Sep 17, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@aoyawale
Copy link


TASK [tower_install : run tower installer for version 3.5.2-1] *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /root/automate-tower-ha-dr/roles/tower_install/tasks/main.yml:9
Using module file /usr/lib/python3.6/site-packages/ansible/modules/commands/command.py
Pipelining is enabled.
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'ANSIBLE_BECOME_METHOD=sudo ANSIBLE_BECOME=True /usr/libexec/platform-python && sleep 0'
changed: [localhost] => changed=true 
  cmd:
  - ./setup.sh
  - -i
  - /root/automate-tower-ha-dr/tower-inventory.py
  - -e
  - required_ram=0
  - --
  delta: '0:00:02.008903'
  end: '2019-09-17 15:28:49.698168'
  invocation:
    module_args:
      _raw_params: './setup.sh -i /root/automate-tower-ha-dr/tower-inventory.py -e required_ram=0 -- '
      _uses_shell: false
      argv: null
      chdir: tower-installer/ansible-tower-setup-bundle-3.5.2-1.el8
      creates: null
      executable: null
      removes: null
      stdin: null
      stdin_add_newline: true
      strip_empty_ends: true
      warn: true
  rc: 0
  start: '2019-09-17 15:28:47.689265'
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    Using /etc/ansible/ansible.cfg as config file
     [WARNING]:  * Failed to parse /root/automate-tower-ha-dr/tower-inventory.py
    with script plugin: Inventory script (/root/automate-tower-ha-dr/tower-
    inventory.py) had an execution error: /usr/bin/env: python: No such file or
    directory
     [WARNING]:  * Failed to parse /root/automate-tower-ha-dr/tower-inventory.py
    with ini plugin: /root/automate-tower-ha-dr/tower-inventory.py:3: Expected
    key=value host variable assignment, got: json
     [WARNING]: Unable to parse /root/automate-tower-ha-dr/tower-inventory.py as an
    inventory source
     [WARNING]: No inventory was parsed, only implicit localhost is available
     [WARNING]: provided hosts list is empty, only localhost is available. Note
    that the implicit localhost does not match 'all'
     [WARNING]: Could not match supplied host pattern, ignoring: tower
     [WARNING]: Could not match supplied host pattern, ignoring: database
     [WARNING]: Could not match supplied host pattern, ignoring: instance_group_*
  
    PLAY [tower:database:instance_group_*] *****************************************
    skipping: no hosts matched
  
    PLAY [Group nodes by OS distribution] ******************************************
    skipping: no hosts matched
     [WARNING]: Could not match supplied host pattern, ignoring: RedHat-7*
     [WARNING]: Could not match supplied host pattern, ignoring: CentOS-7*
     [WARNING]: Could not match supplied host pattern, ignoring: OracleLinux-7*
     [WARNING]: Could not match supplied host pattern, ignoring: RedHat-8*
     [WARNING]: Could not match supplied host pattern, ignoring: CentOS-8*
     [WARNING]: Could not match supplied host pattern, ignoring: Ubuntu-16.04
  
    PLAY [Group supported distributions] *******************************************
    skipping: no hosts matched
  
    PLAY [Group deprecated distributions] ******************************************
    skipping: no hosts matched
     [WARNING]: Could not match supplied host pattern, ignoring: supported
  
    PLAY [Ensure all node OS distributions are supported] **************************
    skipping: no hosts matched
     [WARNING]: Could not match supplied host pattern, ignoring: Ubuntu-*
     [WARNING]: Could not match supplied host pattern, ignoring: isolated_group_*
  
    PLAY [Ensure all isolated node OS distributions are supported] *****************
    skipping: no hosts matched
     [WARNING]: Could not match supplied host pattern, ignoring: deprecated
  
    PLAY [Check for deprecated platforms] ******************************************
    skipping: no hosts matched
  
    PLAY [Define role discovered variables, usable throughout the playbook] ********
    skipping: no hosts matched
  
    PLAY [Verify consistency of inventory contents] ********************************
    skipping: no hosts matched
  
    PLAY [Sanity check and prep Tower node(s)] *************************************
    skipping: no hosts matched
  
    PLAY [Prep installation repos] *************************************************
    skipping: no hosts matched
  
    PLAY [Install postgres database node] ******************************************
    skipping: no hosts matched
  
    PLAY [Install Tower node(s)] ***************************************************
    skipping: no hosts matched
  
    PLAY [Install Tower isolated node(s)] ******************************************
    skipping: no hosts matched
  
    PLAY RECAP *********************************************************************
  
    The setup process completed successfully.
    Setup log saved to /var/log/tower/setup-2019-09-17-15:28:47.log
  stdout_lines: <omitted>
Read vars_file 'tower-vars.yml'
@aoyawale aoyawale added the bug Something isn't working label Sep 17, 2019
@mpetrive-rh
Copy link
Collaborator

I am not sure how this needs to be handled on RHEL/CentOS 8. There is no default python in the environment (in your PATH) for RHEL 8. Some research is needed

@tech2734
Copy link

tech2734 commented Feb 16, 2021

Your control node is RHEL8 you will need to change the shebang in tower-inventory.py to either python2 or python3
#!/usr/bin/env python2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants