FEATURE: Ansible module to manage Stacki groups#848
Open
Conversation
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
}
}
```
bgreenb
approved these changes
Oct 23, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An Ansible module for adding and removing Stacki groups.
The module takes these parameters:
name- The name of the group to managestate- If present, then a group will be added (if needed). If absent, then the group will be removed.Example playbook:
Output of the debug commands, showing the structure of the data returned: