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

Handle facts for HP-UX 9000/785 architecture #33333

Merged
merged 1 commit into from
Jan 18, 2018
Merged

Conversation

Akasurde
Copy link
Member

SUMMARY

This fix adds support for HP-UX '9000/785' architecture.

Fixes: #31976

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/facts/hardware/hpux.py

ANSIBLE VERSION
2.5devel

This fix adds support for HP-UX '9000/785' architecture.

Fixes: ansible#31976

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 28, 2017
@gundalow gundalow removed the needs_triage Needs a first human triage before being processed. label Nov 29, 2017
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Nov 29, 2017
@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 7, 2017
@@ -55,7 +55,7 @@ def get_cpu_facts(self, collected_facts=None):
cpu_facts = {}
collected_facts = collected_facts or {}

if collected_facts.get('ansible_architecture') == '9000/800':
if collected_facts.get('ansible_architecture') in ['9000/800', '9000/785']:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what the other possible values here are?

Can we generalize and assume any '^9000.*' ansible_architecture should use ioscan?

Could we invert the if/elif check for ia64 and else use ioscan?

roughly...

if collected.facts.get('ansible_architecture')  == 'ia64':
      # < ia64 stuff here >
else:
     # < 9000 ioscan stuff here>

or check for '9000' in arch?

if collected_facts.get('ansible_architecture') == 'ia64':
    #  < do ia64 stuff >
elif collected_facts.get('ansible_architecture', '').startswith('9000/'):
  # < do 9000 ioscan stuff >

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this. Adding more people - @nrwahl2 @davx8342 - Could you please provide some advice over here ?

@alikins
Copy link
Contributor

alikins commented Jan 18, 2018

Think I'll merge for now and add an issue to generalize the check (#35055)

@alikins alikins merged commit 0a86287 into ansible:devel Jan 18, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@dagwieers dagwieers added the hpux HP-UX community label Jan 18, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. hpux HP-UX community 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:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HP-UX: setup module fails with AttributeError: 'NoneType' object has no attribute 'groups'
5 participants