Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target host syslog logging accidentally tied to runtime verbosity #18569

Closed
omgjlk opened this issue Nov 21, 2016 · 3 comments
Closed

Target host syslog logging accidentally tied to runtime verbosity #18569

omgjlk opened this issue Nov 21, 2016 · 3 comments
Assignees
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release

Comments

@omgjlk
Copy link
Contributor

omgjlk commented Nov 21, 2016

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Module execution logging on the target host

ANSIBLE VERSION
ansible-playbook 2.2.0.0
  config file = /Users/jkeating/src/hoist/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION
OS / ENVIRONMENT

N/A

SUMMARY

Prior to a56c0bc when ansible executed a module on a target host, the invocation of that module was logged to syslog, which was useful for auditing who's doing what to a particular host with Ansible. After that commit, the logging only happens if the execution of ansible was done with verbosity level 3 or above.

STEPS TO REPRODUCE

Execute ansible-playbook with less than verbosity 3, no indication on remote host that anything was done.

EXPECTED RESULTS

I would expect to see things like:

Nov 21 19:06:08 datadog-demo ansible-user[31027]: Invoked with comment=None ssh_key_bits=0 update_password=always non_unique=False force=False ssh_key_type=rsa ssh_key_passphrase=NOT_LOGGING_PARAMETER createhome=True uid=None home=None append=False skeleton=None ssh_key_comment=ansible-generated on datadog-demo group=nodepool system=False state=present shell=None expires=None ssh_key_file=None groups=None move_home=False password=NOT_LOGGING_PARAMETER name=nodepool seuser=None remove=False login_class=None generate_ssh_key=None
ACTUAL RESULTS

There is no logging of the module execution.

@ansibot ansibot added bug_report affects_2.2 This issue/PR affects Ansible v2.2 labels Nov 21, 2016
@jctanner jctanner added the P2 Priority 2 - Issue Blocks Release label Nov 21, 2016
@jctanner
Copy link
Contributor

@bcoca ping

bcoca added a commit to bcoca/ansible that referenced this issue Nov 29, 2016
bcoca added a commit that referenced this issue Nov 29, 2016
* log on target based on nolog, not verbosity

fies #18569

* initialize module name

removing verbosity exposed missing name at certain stages, initialize to file name
and update later once module args are parsed
@jylenhofgfi
Copy link

I confirm the patch works also on the 2.2 branch.
Could you please push it to the 2.2 stable branch ?

Thanks

bcoca added a commit that referenced this issue Dec 21, 2016
@bcoca
Copy link
Member

bcoca commented Dec 21, 2016

backported to 2.2, so closing this issue.

@bcoca bcoca closed this as completed Dec 21, 2016
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

5 participants