Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FEATURE: Ansible module to manage Stacki groups #848

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

caladd
Copy link
Contributor

@caladd caladd commented Oct 23, 2020

An Ansible module for adding and removing Stacki groups.

The module takes these parameters:
name - The name of the group to manage
state - If present, then a group will be added (if needed). If absent, then the group will be removed.

Example playbook:

---
- hosts: localhost
  tasks:
    - name: Add a group
      stacki_group:
        name: test
      register: result

    - name: Add group output
      debug:
        var: result

    - name: Remove a group
      stacki_group:
        name: test
        state: absent
      register: result

    - name: Remove group output
      debug:
        var: result

Output of the debug commands, showing the structure of the data returned:

TASK [Add group output] *************************************************************************
ok: [localhost] => {
    "result": {
        "changed": true,
        "failed": false
    }
}

TASK [Remove group output] **********************************************************************
ok: [localhost] => {
    "result": {
        "changed": true,
        "failed": false
    }
}

Verified

This commit was signed with the committer’s verified signature.
An Ansible module for adding and removing Stacki groups.

The module takes these parameters:
`name` - The name of the group to manage
`state` - If present, then a group will be added (if needed). If absent, then the group will be removed.

Example playbook:
```
---
- hosts: localhost
  tasks:
    - name: Add a group
      stacki_group:
        name: test
      register: result

    - name: Add group output
      debug:
        var: result

    - name: Remove a group
      stacki_group:
        name: test
        state: absent
      register: result

    - name: Remove group output
      debug:
        var: result
```

Output of the debug commands, showing the structure of the data returned:
```
TASK [Add group output] *************************************************************************
ok: [localhost] => {
    "result": {
        "changed": true,
        "failed": false
    }
}

TASK [Remove group output] **********************************************************************
ok: [localhost] => {
    "result": {
        "changed": true,
        "failed": false
    }
}
```
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants