Hide Forgot
- What is the nature and description of the request? As an admin I require the ability to run Ansible playbooks and collect the logs at a later point. - Why does the customer need this? (List the business requirements here) Because it is off by default so if you don't save the stdout, the details generated are gone quickly. - How would the customer like to achieve this? (List the functional requirements here) Turn on the config setting in /etc/ansible/ansible.cfg (line 92 with ansible 2.2.3.0-1.el7.noarch installed) - For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. Install ansible and have the logging setting enabled already - Is there already an existing RFE upstream or in Red Hat Bugzilla? no
Is the suggestion here that OpenShift override the default ansible configuration files so that they log anible run's to logs by default?
Ansible takes configuration from projects as well. For example, if we had the OpenShift install playbooks in a directory like this: os-ansible-installer/ - roles/ - roleA/ - roleB/ - vars/ - main.yml - site_vault.yml - install_openshift_playbook.yml - ansible.cfg If, in the ansible.cfg, the OpenShift team supplied overrides to Ansible's logging options, then runs of `install_openshift_playbook.yml` would pick up those and any other configs in ansible.cfg. So there's no need to override system config.
(In reply to Ryan Brown from comment #9) > If, in the ansible.cfg, the OpenShift team supplied overrides to Ansible's > logging options, then runs of `install_openshift_playbook.yml` would pick up > those and any other configs in ansible.cfg. So there's no need to override > system config. Here: https://github.com/openshift/openshift-ansible/blob/master/ansible.cfg#L10
We need to update ansible.cfg to ensure that it logs and update the documentation to have them change directories to /usr/share/ansible/openshift-ansible prior to running playbooks.
https://github.com/openshift/openshift-ansible/pull/9247 Sets log path to ~/openshift-ansible.log We'll open a docs pr that instructs people to cd /usr/share/ansible/openshift-ansible prior to running playbooks.
Verified this bug with openshift-ansible-3.11.0-0.10.0.git.0.91bb588None.noarch, and PASS. # pwd /usr/share/ansible/openshift-ansible # cat ansible.cfg <--snip--> [defaults] # Set the log_path log_path = ~/openshift-ansible.log <--snip--> # cat ~/openshift-ansible.log cat: /root/openshift-ansible.log: No such file or directory # ansible-playbook -i /tmp/qe-inventory-host-file playbooks/openshift-checks/pre-install.yml # ll ~/openshift-ansible.log -rw-r--r--. 1 root root 75873 Aug 3 04:27 /root/openshift-ansible.log
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2652