Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1658935 - [RFE] Remove unnecessary warning from running prerequisites.yml playbook when checking for chrony
Summary: [RFE] Remove unnecessary warning from running prerequisites.yml playbook when...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 08:30 UTC by Brendan Mchugh
Modified: 2018-12-13 18:14 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-13 18:14:59 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Brendan Mchugh 2018-12-13 08:30:25 UTC
Description of problem:
Every time that the prerequisites.yml playbook runs this warning comes up.

TASK [Determine if chrony is installed] ********************************************************************************************************************************************************************
 [WARNING]: Consider using the yum, dnf or zypper module rather than running rpm.  If you need to use command because yum, dnf or zypper is insufficient you can add warn=False to this command task or set
command_warnings=False in ansible.cfg to get rid of this message.


Version-Release number of the following components:

openshift-ansible-3.11.16-1.git.0.4ac6f81.el7.noarch
ansible-2.6.5-1.el7ae.noarch

ansible 2.6.5
  config file = /home/quicklab/ansible.cfg
  configured module search path = [u'/home/quicklab/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]


How reproducible:

Steps to Reproduce:
1. ansible -i hosts masters -m command -a "rpm -q chrony"
2.
3.

Actual results:
[WARNING]: Consider using the yum, dnf or zypper module rather than running rpm.  If you need to use command because yum, dnf or zypper is insufficient you can add warn=False to this command task or set
command_warnings=False in ansible.cfg to get rid of this message.


Expected results:
No unnecessary warnings in the ansible output.

Additional info:
The current version of the task in "/usr/share/ansible/openshift-ansible/playbooks/init/base_packages.yml" is as follows:

  - name: Determine if chrony is installed
    command: rpm -q chrony
    failed_when: false
    register: chrony_installed


Perhaps this specific task could be modified so that it specifically will not emit the warning while other tasks would remain unaffected.

  - name: Determine if chrony is installed
    command: rpm -q chrony
    args:
      warn: no
    failed_when: false
    register: chrony_installed

Comment 1 Scott Dodson 2018-12-13 18:14:59 UTC
This will be removed in 4.0 and does not meet the criteria for resolution in existing releases.


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