Skip to content

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
    }
}

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
    }
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants