8000 setup module became excessively verbose in 2.8, but only if used implicitly · Issue #58310 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
setup module became excessively verbose in 2.8, but only if used implicitly #58310
Closed
@smemsh

Description

@smemsh
SUMMARY

implicit fact gathering (gather_facts: true) has started dumping the entire setup output with just a single -v, which is new with 2.8.0 and still present in 2.8.1 (not present in 2.7.11). this does not happen with -v if gather_facts: false and setup task is run manually in the play.

please restore the many-years-old, established behavior of implicit fact gathering to not have so much spam in -v output, which will also restore consistency with manual setup module invocation.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

setup

ANSIBLE VERSION
ansible 2.8.1
  config file = /path/to/playbase/.ansible.cfg
  configured module search path = [u'/path/to/playbase/lib']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.15+ (default, Feb  3 2019, 13:13:16) [GCC 8.2.0]

CONFIGURATION
ANSIBLE_NOCOWS(/path/to/playbase/.ansible.cfg) = True
DEFAULT_GATHER_SUBSET(/path/to/playbase/.ansible.cfg) = [u'!all', u'min', u'network']
DEFAULT_LOAD_CALLBACK_PLUGINS(/path/to/playbase/.ansible.cfg) = True
DEFAULT_MODULE_PATH(/path/to/playbase/.ansible.cfg) = [u'/path/to/playbase/lib']
DEFAULT_STDOUT_CALLBACK(/path/to/playbase/.ansible.cfg) = default
DISPLAY_ARGS_TO_STDOUT(/path/to/playbase/.ansible.cfg) = False
DISPLAY_SKIPPED_HOSTS(/path/to/playbase/.ansible.cfg) = False

(irrelevant removed)

OS / ENVIRONMENT

controller: debian 9
target: ubuntu 16

STEPS TO REPRODUCE

good (non-execessive) output from ansible-playbook -v:

- hosts: localhost                                                                                                                    
  connection: local                                                                                                                   
  gather_facts: false                                                                                                                 
  tasks:                                                                                                                              
    - setup:                                                                                                                          
    - meta: noop

bad (excessive, entire setup fact structure dumped) output from ansible-playbook -v:

- hosts: localhost                                                                                                                    
  connection: local                                                                                                                   
  gather_facts: true                                                                                                                  
  tasks:                                                                                                                              
    - meta: noop
EXPECTED RESULTS

expect that setup doesn't show entire set of gathered facts just with a simple -v, filling our logs with orders of magnitude more spam and forcing us to rewrite all our plays for explicit fact gathering to avoid it and all our roles to check if facts are present and run setup if not

removing -v is not an option because that's far too little information in most cases, we want more than "ok" for most things, the output is totally fine for all other modules under -v but setup module has now changed its long standing behavior. expect it to behave same way as it has for years, looking something like this:

ok: [localhost]
ACTUAL RESULTS

huge dump of entire json structure:

ok: [localhost] => {"ansible_facts": {"ansible_all_ipv4_addresses": ... <snipped>

furthermore, it's inconsistent between implicit and explicit gathering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.8This issue/PR affects Ansible v2.8bugThis issue/PR relates to a bug.has_prThis issue has an associated PR.moduleThis issue/PR relates to a module.support:coreThis issue/PR relates to code supported by the Ansible Engineering Team.systemSystem category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0