mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 21:42:17 +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
16 lines
303 B
YAML
16 lines
303 B
YAML
---
|
|
- name: Playbook to handle hostgroups
|
|
hosts: ipaserver
|
|
become: true
|
|
|
|
tasks:
|
|
# Ensure host-group databases is present
|
|
- ipahostgroup:
|
|
ipaadmin_password: MyPassword123
|
|
name: databases
|
|
host:
|
|
- db.example.com
|
|
hostgroup:
|
|
- mysql-server
|
|
- oracle-server
|