Bug 1469406 - install failed when use default user root to run playbook
install failed when use default user root to run playbook
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.6.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Scott Dodson
Johnny Liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-11 04:40 EDT by Anping Li
Modified: 2017-07-11 09:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
inventory file and logs (204.56 KB, application/x-gzip)
2017-07-11 04:40 EDT, Anping Li
no flags Details

  None (edit)
Description Anping Li 2017-07-11 04:40:27 EDT
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
Comment 1 Scott Dodson 2017-07-11 09:06:16 EDT
Setting to low priority because as far as I know we always document the inventory with ansible_ssh_user being set.

Note You need to log in before you can comment on or make changes to this bug.