Red Hat Bugzilla – Bug 1296615
[SME] Interactive Installer should (optionally?) replace /etc/ansible/hosts
Last modified: 2017-08-24 16:49:38 EDT
Description of problem:
When running the interactive installer, the ansible hosts file is only stored in ~/.config/openshift/.ansible/hosts. The system default /etc/ansible/hosts file is not updated.
Per BZ 1296597
It would be great if running ansible manually and/or converting to an advanced installation were easier.
It appears that I could potentially copy /root/.config/openshift/.ansible/hosts to /etc/ansible/hosts ...
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run atomic-openshift-installer
installed / upgraded properly, but /etc/ansible/hosts is not updated, replaced or touched.
/etc/ansible/hosts should be linked, updated, replaced properly.
atomic-openshift-installer was designed so that it wouldn't have to be run as root. You can definitely copy the host file it creates to /etc/ansible/hosts.
I'd prefer to address this in documentation as you mention in Bug #1296597. I'm curious if Jason agrees.
It might be nice for atomic-openshift-installer to print a notice advising to copy the hosts file to /etc/ansible.
While not directly related and only out of curiosity, since the installer does not ask me what account to use for ansible, do I assume that it will only ssh as root?
If the goal is to not have to run as root, perhaps the atomic-openshift-installer should ask for ssh user and sudo information for ansible for the non-root use case.
When the installer asks, "User for ssh access" that is the user that is used. The requirement is that passwordless sudo access be available for that user. When I was referring to ansible not running as root I meant from the "control" machine. It can run as your normal user even if it connect to the remote hosts as root to install everything.
I'm not opposed to finding a non-intrusive way to present the various steps for switching to an advanced installation. Marking this as low severity will remove it from our release blocker list while still causing our nag emails to be sent to the bug owner.
Outside of modifying /etc/ansible/hosts, it is possible to avoid having to specify the host file when running ansible. One could specify hostfile in an ansible config file (lookup path is ./ansible.cfg, ~/.ansible.cfg, /etc/ansible/ansible.cfg).
Without knowing the user's intent, I'd be hesitant to assume that the user would want to overwrite /etc/ansible/hosts by running the openshift installer.
That said, I fully agree that we should probably tell the user about it and how they could invoke the playbooks manually. Maybe a README file that is generated in ~/.config/openshift/ that references the host file and the advanced installation docs?
I like the idea of README in ~/.config/openshift/