command_warnings fails in 2.3.0?

56 views
Skip to first unread message

Stéphane M

unread,
Aug 1, 2017, 8:09:36 AM8/1/17
to Ansible Project
Hello,

It seems to me that command_warnings (http://docs.ansible.com/ansible/latest/intro_configuration.html#command-warnings )works fine with ansible-2.2.1.0 but not in 2.3.0.0 nor 2.3.1.0

Is anybody experiencing the same issue?

Stéphane

Kai Stian Olstad

unread,
Aug 1, 2017, 8:33:05 AM8/1/17
to ansible...@googlegroups.com
On 01. aug. 2017 14:09, Stéphane M wrote:
> It seems to me that command_warnings
> <http://docs.ansible.com/ansible/latest/intro_configuration.html#command-warnings>works
> fine with ansible-2.2.1.0 but not in 2.3.0.0 nor 2.3.1.0
>
> Is anybody experiencing the same issue?

Can't confirm this with 2.3.1.0 since it's works in my test.

--
Kai Stian Olstad

Stéphane M

unread,
Aug 1, 2017, 9:01:14 AM8/1/17
to Ansible Project, ansible-pr...@olstad.com
My test seems broken.
I think it works actually.

Sorry for spamming.

Stéphane M

unread,
Aug 1, 2017, 9:30:52 AM8/1/17
to Ansible Project, ansible-pr...@olstad.com
In fact, I think there is actually an issue in 2.3.0.0 and 2.3.1.0:

the warnings are removed from the ansible log of the control machine
but NOT from the syslog of the managed machines.

Stéphane

Stéphane M

unread,
Aug 1, 2017, 9:49:35 AM8/1/17
to Ansible Project, ansible-pr...@olstad.com

test with ansible 2.3.1.0 on Fedora 24:

> ansible-playbook -i hosts test.yml

PLAY [all] ********************************************************************************************

TASK [command] ****************************************************************************************
changed: [localhost -> localhost]

PLAY RECAP ********************************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0  


in /var/log/messages :
ansible-command[22445]: [WARNING] Consider using service module rather than running service



> more *
::::::::::::::
ansible.cfg
::::::::::::::
[defaults]
command_warnings = False



::::::::::::::
hosts
::::::::::::::

localhost



::::::::::::::
test.yml
::::::::::::::
---

- hosts: all
  gather_facts: false
  tasks:
  - command: service --status-all
    delegate_to: localhost
   

> ansible-playbook --version
ansible-playbook 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, May 10 2017, 20:04:36) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]



> sudo dnf info ansible
Installed Packages
Name        : ansible
Arch        : noarch
Epoch       : 0
Version     : 2.3.1.0
Release     : 1.fc24
Size        : 27 M
Repo        : @System
From repo   : updates
Summary     : SSH-based configuration management, deployment, and task execution system
URL         : http://ansible.com
License     : GPLv3+
Description :
            : Ansible is a radically simple model-driven configuration management,
            : multi-node deployment, and remote task execution system. Ansible works
            : over SSH and does not require any software or daemons to be installed
            : on remote nodes. Extension modules can be written in any language and
            : are transferred to managed machines automatically.
Reply all
Reply to author
Forward
0 new messages