Skip to content

Commit

Permalink
ops/openstack: add host aggregates playbook (#225)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt committed Dec 13, 2023
1 parent 3b5cf94 commit 48ec6b3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
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 }}"
```
2 changes: 1 addition & 1 deletion docs/guides/other-guides/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 100
## Ansible

We implement all the default rules of Ansible Lint. All default rules can be found in the
Ansible Lint documentation: <https://ansible.readthedocs.io/projects/lint/rules/>
[Ansible Lint documentation](https://ansible.readthedocs.io/projects/lint/rules/).

### Task names

Expand Down

0 comments on commit 48ec6b3

Please sign in to comment.