Skip to content

Adding instance can't be done idempotently due to node_state #37

Open
@Rickmarges

Description

@Rickmarges

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Bug Summary

When adding an execution node via the module the only node_state options are installed or deprovisioning, however if an instance is already installed the API gives returns state ready resulting in a false changed status

If state installed installed is passed to the module, it always returns state changed for an already installed instance.
Passing state ready is, however, not available because the module doesn't support it.

AWX version

21.13.0

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

openshift

Modifications

no

Ansible version

ansible [core 2.13.8]
  config file = None
  configured module search path = ['/home/_/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/_/.venv/lib64/python3.8/site-packages/ansible
  ansible collection location = /home/_/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/_/.venv/bin/ansible
  python version = 3.8.14 (default, Sep 19 2022, 09:47:48) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)]
  jinja version = 3.1.2
  libyaml = True

Operating system

No response

Web browser

No response

Steps to reproduce

  1. Deploy execution node with the instance module
  2. Replay the same playbook

Expected results

ok: [localhost] (ie. the playbook being idempotent)

Actual results

changed: [localhost] (not idempotent and always giving changed)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions