-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(libvirt): install libvirt, enable and start service, configure s…
…torage pool. add ansible galaxy and gh actions specifics
- Loading branch information
Showing
16 changed files
with
107 additions
and
141 deletions.
There are no files selected for viewing
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "chore(ci): " |
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,12 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
call-workflow: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
secrets: | ||
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }} |
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,12 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
secrets: | ||
RABE_ITREAKTION_GITHUB_TOKEN: ${{ secrets.RABE_ITREAKTION_GITHUB_TOKEN }} |
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,10 @@ | ||
name: Lint and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow: | ||
uses: radiorabe/actions/.github/workflows/[email protected] |
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 |
---|---|---|
@@ -1,2 +1,11 @@ | ||
# ansible-collection-foreman-libvirt | ||
|
||
Ansible collection for making a host ready to serve as libvirt compute resource in Foreman. | ||
|
||
## Roles | ||
|
||
* [`libvirt`](https://github.com/radiorabe/ansible-collection-foreman-libvirt/tree/main/roles/libvirt) | ||
|
||
## License | ||
|
||
This collection is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License. |
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,20 @@ | ||
namespace: radiorabe | ||
name: foreman_libvirt | ||
version: 0.0.0 | ||
readme: README.md | ||
authors: | ||
- Simon Nussbaum <@smirta> | ||
description: Ansible collection for making a host ready to serve as libvirt compute resource in Foreman. | ||
license_file: LICENSE | ||
tags: | ||
- radiorabe | ||
- kvm | ||
- libvirt | ||
- qemu | ||
- foreman | ||
- cloudinit | ||
dependencies: {} | ||
repository: https://github.com/radiorabe/ansible-collection-foreman-libvirt | ||
documentation: https://github.com/radiorabe/ansible-collection-foreman-libvirt/blob/main/README.md | ||
homepage: hhttps://github.com/radiorabe/ansible-collection-foreman-libvirt | ||
issues: https://github.com/radiorabe/ansible-collection-foreman-libvirt/issues |
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 @@ | ||
requires_ansible: ">=2.11,<2.17" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,38 +1,34 @@ | ||
Role Name | ||
========= | ||
# Ansible Role - radiorabe.foreman-libvirt.libvirt | ||
|
||
A brief description of the role goes here. | ||
Install libvirtd, enable and start libvirtd and create default storage pool using [`ansible.builtin.package`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html), [`ansible.builtin.systemd_service`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_service_module.html) and [`ansible.builtin.template`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html). | ||
|
||
Requirements | ||
------------ | ||
## Requirements | ||
|
||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. | ||
Destination host needs to be able to download and install libvirt package from repository. | ||
|
||
Role Variables | ||
-------------- | ||
## Role Variables | ||
|
||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. | ||
| Variable | Default | Description | | ||
| -------- | ------- | ----------- | | ||
| `libvirt_storage_pool_path` | `/var/lib/libvirt/images/` | libvirt directory storage pool path. | | ||
| `libvirt_storage_pool_name` | `default` | libvirt directory storage pool name. | | ||
| `libvirt_libvirt_package_name` | `libvirt` | libvirt package name from repository. | | ||
| `libvirt_libvirt_service_name` | `libvirtd` | libvirt service name. | | ||
|
||
Dependencies | ||
------------ | ||
## Dependencies | ||
|
||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. | ||
None | ||
|
||
Example Playbook | ||
---------------- | ||
## Example Playbook | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
- hosts: servers | ||
roles: | ||
- { role: username.rolename, x: 42 } | ||
```yaml | ||
- hosts: all | ||
roles: | ||
- libvirt | ||
``` | ||
License | ||
------- | ||
## License | ||
BSD | ||
|
||
Author Information | ||
------------------ | ||
|
||
An optional section for the role authors to include contact information, or a website (HTML is not allowed). | ||
This role is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License. |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
--- | ||
# defaults file for kvm_provision | ||
storage_pool_path: '/var/lib/libvirt/images/' | ||
storage_pool_name: 'default' | ||
# defaults file for libvirt | ||
libvirt_storage_pool_path: /var/lib/libvirt/images/ | ||
libvirt_storage_pool_name: default | ||
libvirt_libvirt_package_name: libvirt | ||
libvirt_libvirt_service_name: libvirtd |
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