mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
FreeIPA 4.8.7 introduced an option to rename an existing hostgroup. This patch adds support for renaming hostgroups if the option is available on installed IPA version. A new state `renamed` and a new option `rename` (alias: `new_name`) was added to module `ipahostgroup` to allow renaming of host groups. The implemented behavior is: * Rename if `name` exists and `rename` doesn't. * Do nothing if `name` does not exist and `rename` does, or if `name` equals to `rename`. (result.changed is False) * Fail if neither or both `name` and `rename` exist.
13 lines
272 B
YAML
13 lines
272 B
YAML
---
|
|
- name: Playbook to handle hostgroups
|
|
hosts: ipaserver
|
|
become: yes
|
|
|
|
tasks:
|
|
- name : Rename host-group from `databases` to `datalake`
|
|
ipahostgroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: databases
|
|
rename: datalake
|
|
state: renamed
|