mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
New utils script to generate new modules using templates
The script will create the module in plugins/modules, the README, test and
playbook files.
Usage: new_module [options] <module name> <author name>
<author email address>
Create new ansible-freeipa module using templates.
Options:
-m Create module with member support
-f Force creation
-h Print this help
Example:
utils/new_module -m permission "My Name" myname@some.email
This commit is contained in:
132
utils/templates/README-module+member.md.in
Normal file
132
utils/templates/README-module+member.md.in
Normal file
@@ -0,0 +1,132 @@
|
||||
${name^} module
|
||||
============
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The $name module allows to ensure presence and absence of ${name}s and $name members.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* ${name^} management
|
||||
|
||||
|
||||
Supported FreeIPA Versions
|
||||
--------------------------
|
||||
|
||||
FreeIPA versions 4.4.0 and up are supported by the ipa$name module.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
**Controller**
|
||||
* Ansible version: 2.8+
|
||||
|
||||
**Node**
|
||||
* Supported FreeIPA version (see above)
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Example inventory file
|
||||
|
||||
```ini
|
||||
[ipaserver]
|
||||
ipaserver.test.local
|
||||
```
|
||||
|
||||
|
||||
Example playbook to make sure $name "NAME" is present:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook to manage IPA $name.
|
||||
hosts: ipaserver
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- ipa$name:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: NAME
|
||||
# Add needed parameters here
|
||||
```
|
||||
|
||||
Example playbook to make sure $name "NAME" member PARAMETER2 VALUE is present:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook to manage IPA $name PARAMETER2 member.
|
||||
hosts: ipaserver
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- ipa$name:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: NAME
|
||||
PARAMETER2: VALUE
|
||||
action: member
|
||||
```
|
||||
|
||||
|
||||
Example playbook to make sure $name "NAME" member PARAMETER2 VALUE is absent:
|
||||
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook to manage IPA $name PARAMETER2 member.
|
||||
hosts: ipaserver
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- ipa$name:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: NAME
|
||||
PARAMETER2: VALUE
|
||||
action: member
|
||||
state: absent
|
||||
```
|
||||
|
||||
|
||||
Example playbook to make sure $name "NAME" is absent:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Playbook to manage IPA $name.
|
||||
hosts: ipaserver
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- ipa$name:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: NAME
|
||||
state: absent
|
||||
```
|
||||
|
||||
|
||||
MORE EXAMPLE PLAYBOOKS HERE
|
||||
|
||||
|
||||
Variables
|
||||
---------
|
||||
|
||||
ipa$name
|
||||
-------
|
||||
|
||||
Variable | Description | Required
|
||||
-------- | ----------- | --------
|
||||
`ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
|
||||
`ipaadmin_password` | The admin password is a string and is required if there is no admin ticket available on the node | no
|
||||
`name` \| `ALIAS` | The list of $name name strings. | yes
|
||||
`PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||
`PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||
`action` | Work on $name or member level. It can be on of `member` or `$name` and defaults to `$name`. | no
|
||||
`state` | The state to ensure. It can be one of `present`, `absent`, default: `present`. | no
|
||||
|
||||
|
||||
Authors
|
||||
=======
|
||||
|
||||
$author
|
||||
Reference in New Issue
Block a user