Bug 1296615 - [SME] Interactive Installer should (optionally?) replace /etc/ansible/hosts
[SME] Interactive Installer should (optionally?) replace /etc/ansible/hosts
Status: CLOSED WONTFIX
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.1.0
Unspecified Unspecified
high Severity low
: ---
: ---
Assigned To: Samuel Munilla
Xiaoli Tian
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-07 11:35 EST by Josh Preston
Modified: 2017-08-24 16:49 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-24 16:49:38 EDT
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)

  None (edit)
Description Josh Preston 2016-01-07 11:35:50 EST
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):

atomic-openshift-utils-3.0.20-1.git.0.3703f1b.el7aos.noarch

How reproducible:

always

Steps to Reproduce:
1. run atomic-openshift-installer
2.
3.

Actual results:

installed / upgraded properly, but /etc/ansible/hosts is not updated, replaced or touched.

Expected results:

/etc/ansible/hosts should be linked, updated, replaced properly.

Additional info:
Comment 1 Brenton Leanhardt 2016-01-07 14:22:26 EST
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.
Comment 2 Josh Preston 2016-01-07 14:36:20 EST
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.
Comment 3 Brenton Leanhardt 2016-01-07 15:03:15 EST
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.
Comment 4 Jason DeTiberus 2016-01-11 13:19:09 EST
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?
Comment 5 Brenton Leanhardt 2016-01-11 13:51:53 EST
I like the idea of README in ~/.config/openshift/

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