kubealex / libvirt-ocp4-provisioner

Automate your OCP4 installation
MIT License
91 stars 40 forks source link

path not set for /usr/local/bin ? #38

Closed ayates83 closed 2 years ago

ayates83 commented 2 years ago

It appears that ansible isn't looking at the environment variables set for path on the installed nodes. I can modify the playbooks where the oc and openshift-install commands are run, and add an absolute path in front of the binaries and they execute successfully.

System info: [yates@cypress0 libvirt-ocp4-provisioner]$ cat /etc/os-release NAME="Fedora Linux" VERSION="36 (Workstation Edition)" ID=fedora VERSION_ID=36 VERSION_CODENAME="" PLATFORM_ID="platform:f36" PRETTY_NAME="Fedora Linux 36 (Workstation Edition)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:36" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=36 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=36 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Workstation Edition" VARIANT_ID=workstation

Ansible info: [yates@cypress0 libvirt-ocp4-provisioner]$ ansible --version ansible [core 2.12.6] config file = /home/yates/git/libvirt-ocp4-provisioner/ansible.cfg configured module search path = ['/home/yates/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.10/site-packages/ansible ansible collection location = /home/yates/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 12.0.1 20220308 (Red Hat 12.0.1-0)] jinja version = 3.0.3 libyaml = True

Terraform info: [yates@cypress0 libvirt-ocp4-provisioner]$ terraform --version Terraform v1.1.4 on linux_amd64

Your version of Terraform is out of date! The latest version is 1.2.3. You can update by downloading from https://www.terraform.io/downloads.html

** Fails on checking for openshift binaries on bastion

TASK [Checking for openshift-install tool] **** fatal: [bastion]: FAILED! => {"changed": true, "cmd": "openshift-install version", "delta": "0:00:00.003313", "end": "2022-06-18 21:42:05.895890", "failed_when_result": true, "msg": "non-zero return code", "rc": 127, "start": "2022-06-18 21:42:05.892577", "stderr": "/bin/sh: openshift-install: command not found", "stderr_lines": ["/bin/sh: openshift-install: command not found"], "stdout": "", "stdout_lines": []}

PLAY RECAP **** bastion : ok=18 changed=3 unreachable=0 failed=1 skipped=4 rescued=0 ignored=0
loadbalancer : ok=7 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
localhost : ok=30 changed=1 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0

kubealex commented 2 years ago

Hi @ayates83 ! Thank you for reporting this, I fixed the issue as there were some inconsistencies in the paths. Now they are all uniform in /usr/bin.