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

ipa host disabled bug #1094

Closed
leagueofsoups opened this issue Oct 14, 2020 · 5 comments · Fixed by #8920
Closed

ipa host disabled bug #1094

leagueofsoups opened this issue Oct 14, 2020 · 5 comments · Fixed by #8920
Labels
bug This issue/PR relates to a bug identity module module needs_triage plugins plugin (any type) python3

Comments

@leagueofsoups
Copy link

leagueofsoups commented Oct 14, 2020

SUMMARY

Can't disable ipa host

https://github.com/ansible-collections/community.general/blob/main/plugins/modules/identity/ipa/ipa_host.py#L229
when I try disable host module_host always empty list (because module_host without state arg)
if host already exist I got https://github.com/ansible-collections/community.general/blob/main/plugins/modules/identity/ipa/ipa_host.py#L253, but diff list empty

I low experience with debug ansible modules, but use patch like this. This is work for disable host on my ipa server.

if len(diff) > 0:
  ...
elif state == "disabled":
  changed = True
  client.host_disable(name=name)
  return ...
ISSUE TYPE
  • Bug Report
COMPONENT NAME

ipa_host

ANSIBLE VERSION
  config file = None
  configured module search path = ['/Users/sergejsmirnov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]

CONFIGURATION
OS / ENVIRONMENT

MacOS

STEPS TO REPRODUCE
- name: disable host if exist
  hosts: IDM
  tasks:
    - name: disable host
      community.general.ipa_host:
        fqdn: target_fqdn
        state: disabled
        validate_certs: no
        ipa_pass: pass
        ipa_user: user
        ipa_host: host
EXPECTED RESULTS

have change state, have disabled host

ACTUAL RESULTS

have green state, nothing happens

@ansibullbot
Copy link
Collaborator

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added identity module module plugins plugin (any type) labels Oct 14, 2020
@ansibullbot
Copy link
Collaborator

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug identity module module needs_triage plugins plugin (any type) python3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants