Created attachment 1296124 [details] inventory file and logs Description of problem: Install failed when use the default user 'root' with --private-key to run playbook Version-Release number of the following components: openshift-ansible-3.6.140 How reproducible: always Steps to Reproduce: 1. prepare inventory file and don't specify ansibe_user and ansible_ssh_user. 2. install OCP 3.6 with the default user 'root' and --private-key ansible-playbook --private-key=$HOME/.ssh/libra.pem -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml Actual results: TASK [openshift_master_certificates : Lookup default group for ansible_ssh_user] *** task path: /usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml:166 fatal: [openshift-225.lab.eng.nay.redhat.com]: FAILED! => { "failed": true } MSG: the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible_ssh_user' is undefined The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml': line 166, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Lookup default group for ansible_ssh_user ^ here NO MORE HOSTS LEFT ************************************************************* to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/config.retry PLAY RECAP ********************************************************************* localhost : ok=12 changed=0 unreachable=0 failed=0 openshift-208.lab.eng.nay.redhat.com : ok=138 changed=3 unreachable=0 failed=0 openshift-225.lab.eng.nay.redhat.com : ok=413 changed=59 unreachable=0 failed=1 Failure summary: 1. Host: openshift-225.lab.eng.nay.redhat.com Play: Configure masters Task: openshift_master_certificates : Lookup default group for ansible_ssh_user Message: the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible_ssh_user' is undefined The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml': line 166, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Lookup default group for ansible_ssh_user ^ here Expected results: Additional info: You can add ansible_user=root in the inventory file
Setting to low priority because as far as I know we always document the inventory with ansible_ssh_user being set.
I hit this issue as well in OpenShift 3.10 The documentation does not mention that you have to add the "ansible_ssh_user" if you plan to use the "deploy_cluster.yml" playbook to deploy your cluster. I ran the "prerequisites.yml" before and it did not catch it either or warn me.
Added my name as Docs contact, since I am writing the OED docs initiative documentation.
Changed Doc Contact back to Vikram, per his instructions. Changed status to ASSIGNED; started research.
These both mention the need to set ansible_ssh_user https://docs.openshift.com/container-platform/3.11/install/example_inventories.html https://docs.openshift.com/container-platform/3.11/install/configuring_inventory_file.html Also, every example inventory we ship in the product sets this value. I think we should CLOSED NOTABUG that bug unless Gilbert objects.
Changed status to MODIFIED since discussions are ongoing about whether this should even be documented. (See Comment 6 above.)
Changed status back to ASSIGNED, per Vikram's explanation that it should be MODIFIED only when it was out for review after modifications had actually been made in the docs.
Hi, I used the OCP 3.10 Install Cluster doc in the downstream portal: https://access.redhat.com/documentation/en-us/openshift_container_platform/3.7/pdf/installation_and_configuration/OpenShift_Container_Platform-3.7-Installation_and_Configuration-en-US.pdf There is a table that describes it but does not tell you it's mandatory to set it if you plan to use the playbook.
Correct version I used was OCP 3.10 https://access.redhat.com/documentation/en-us/openshift_container_platform/3.10/pdf/installing_clusters/OpenShift_Container_Platform-3.10-Installing_Clusters-en-US.pdf
LGTM
Anping Li verified. Successfully merged. Therefore, changing status to Closed/Next Release.