mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
There is a new hostgroup management module placed in the plugins folder: plugins/modules/ipahostgroup.py The hostgroup module allows to add, remove and disable hosts. The hostgroup module is as compatible as possible to the Ansible upstream ipa_hostgroup module, but addtionally offers to ensure member presence and absence. Here is the documentation for the module: README-hostgroup.md New example playbooks have been added: playbooks/hostgroup/ensure-hostgroup-is-absent.yml playbooks/hostgroup/ensure-hostgroup-is-present.yml playbooks/hostgroup/ensure-hosts-and-hostgroups-are-absent-in-hostgroup.yml playbooks/hostgroup/ensure-hosts-and-hostgroups-are-present-in-hostgroup.yml
12 lines
228 B
YAML
12 lines
228 B
YAML
---
|
|
- name: Playbook to handle hostgroups
|
|
hosts: ipaserver
|
|
become: true
|
|
|
|
tasks:
|
|
# Ensure host-group databases is present
|
|
- ipahostgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: databases
|
|
state: absent
|