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

aix_facts.py added #49062

Closed
wants to merge 2 commits into from
Closed

aix_facts.py added #49062

wants to merge 2 commits into from

Conversation

flynn1973
Copy link

@flynn1973 flynn1973 commented Nov 23, 2018

SUMMARY
  • This module gathers AIX specific facts
    • It delivers the folowing ansible_facts
      oslevel, build(ING specific), lpps, filesystems, mounts, vgs, lssrc,
    • niminfo, uname, drmode(ING specific)
ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

aix_facts

ADDITIONAL INFORMATION

Examples:

# show the default facts
- name: show default facts
  aix_facts_py:
# show all facts
- name: show all facts
  aix_facts:
    options:
      - all
# show facts uname and build:
- name: show facts uname and build
  aix_facts:
    options:
      - uname
      - build

@ansibot
Copy link
Contributor

ansibot commented Nov 23, 2018

Hi @flynn1973, thank you for submitting this pull-request!

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. labels Nov 23, 2018
@ansibot

This comment has been minimized.

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Nov 23, 2018
@bcoca
Copy link
Member

bcoca commented Nov 28, 2018

why not make this part of standard fact gathering? https://github.com/ansible/ansible/tree/devel/lib/ansible/module_utils/facts

@flynn1973
Copy link
Author

flynn1973 commented Nov 30, 2018

i tried to port it over here (https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/hardware/aix.py) but could not get my head around the functionalities behind the facts gahtering stuff.
i use all the modules from my PR's on play level on a daily basis in production, and it works well enough, at least for me.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 8, 2018
@dagwieers dagwieers added aix AIX community and removed aix AIX community labels Jan 8, 2019
@dagwieers
Copy link
Contributor

@flynn1973 We definitely want to see this in the standard AIX facts, which would make this information available to your playbooks without the need to run this module explicitly. Unless there's a good reason to not enable this module (e.g. it being very slow).

@molekuul
Copy link
Contributor

molekuul commented Jan 9, 2019

@flynn1973 Hi, this module was not ready just for a pull request, that why I didn't do that before.
please contact me about your fork of my AIX-ansible-modules role, where you found this module.

Kind regards,

Joris Weijters

@ansibot
Copy link
Contributor

ansibot commented Jan 9, 2019

@ansibot ansibot added test This PR relates to tests. and removed needs_triage Needs a first human triage before being processed. labels Jan 9, 2019
@kairoaraujo
Copy link
Contributor

@flynn1973 I can help you to have it as part of standard fact, as I had some contact with that before.

@flynn1973
Copy link
Author

you are very welcome!

@ansibot
Copy link
Contributor

ansibot commented Jan 9, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/modules/system/aix_facts.py:412:11: duplicate-except Catching previously caught exception type OSError
lib/ansible/modules/system/aix_facts.py:413:61: undefined-variable Undefined variable 'rc'
lib/ansible/modules/system/aix_facts.py:561:0: anomalous-backslash-in-string Anomalous backslash in string: '\s'. String constant might be missing an r prefix.

The test ansible-test sanity --test boilerplate [explain] failed with 2 errors:

lib/ansible/modules/system/aix_facts.py:0:0: missing: __metaclass__ = type
lib/ansible/modules/system/aix_facts.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test import --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/system/aix_facts.py:325:0: ImportError: No module named 'commands'

The test ansible-test sanity --test import --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/system/aix_facts.py:325:0: ModuleNotFoundError: No module named 'commands'

The test ansible-test sanity --test import --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/system/aix_facts.py:325:0: ModuleNotFoundError: No module named 'commands'

click here for bot help

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jan 9, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jan 17, 2019
@ansibot
Copy link
Contributor

ansibot commented Jan 25, 2019

@ansibot
Copy link
Contributor

ansibot commented Feb 2, 2019

@dagwieers dagwieers removed the test This PR relates to tests. label Feb 4, 2019
@dagwieers
Copy link
Contributor

For this PR, I have added another action item on the AIX action list with a link to this PR so we don't forget to do this. But I am going to close this PR. Feel free to pick up that action item if you need any of these facts by default in Ansible.

PS The only reason for handing certain facts of to special modules is:

  1. If these facts take a long time to be produced and/or may have a specific impact on the system
  2. If these facts relate to a specific object (so you need to add specific parameters to influence the output)

@dagwieers dagwieers closed this Feb 8, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aix AIX community ci_verified Changes made in this PR are causing tests to fail. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants