Skip to content

ipa host disabled bug #1094

Closed
Closed
@leagueofsoups

Description

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions