-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ops/openstack: add host aggregates playbook (#225)
Signed-off-by: Christian Berendt <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
docs/guides/operations-guide/openstack/day2-operations/playbooks.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
sidebar_label: Playbooks | ||
sidebar_position: 40 | ||
--- | ||
|
||
# Playbooks | ||
|
||
## Host aggregates | ||
|
||
Host aggregates can be managed with the playbook. The playbook is used with | ||
`osism apply -e openstack host-aggregates`. | ||
|
||
Further arguments for host aggregates can be found in the | ||
[documentation for the openstack.cloud.host_aggregate](https://docs.ansible.com/ansible/latest/collections/openstack/cloud/host_aggregate_module.html) Ansible module. | ||
|
||
```yaml title="environments/openstack/playbook-host-aggregates.yml" | ||
--- | ||
- name: Manage host aggregates | ||
hosts: localhost | ||
connection: local | ||
|
||
vars: | ||
host_aggregates: | ||
- name: aggregate1 | ||
hosts: | ||
- host1 | ||
- host2 | ||
- host3 | ||
|
||
tasks: | ||
- name: Create host aggregate | ||
openstack.cloud.host_aggregate: | ||
cloud: admin | ||
state: present | ||
name: "{{ item.name }}" | ||
hosts: "{{ item.hosts }}" | ||
loop: "{{ host_aggregates }}" | ||
``` |
This file contains 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