redhat-cop / automate-tower-ha-dr

Configure High Availability and/or Disaster Recovery on a Tower Cluster
MIT License
63 stars 38 forks source link

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 5 years ago

aoyawale commented 5 years ago

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'
mpetrive-rh commented 4 years ago

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 commented 3 years ago

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