Skip to content

Commit

Permalink
feat: init rabe_zabbix collection
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Jan 15, 2024
0 parents commit b65f969
Show file tree
Hide file tree
Showing 12 changed files with 827 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
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): "
12 changes: 12 additions & 0 deletions .github/workflows/release.yaml
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 }}
12 changes: 12 additions & 0 deletions .github/workflows/semantic-release.yaml
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 }}
10 changes: 10 additions & 0 deletions .github/workflows/test.yaml
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]
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Ansible Collection - radiorabe.rabe_zabbix

GitOps our Zabbix. This is where the base of our Zabbix configuration lives.

## Roles

* [`data_collection`](https://github.com/radiorabe/ansible-collection-rabe_zabbix/tree/main/roles/data_collection) Configure Zabbix data collection (host groups and whatnot)

## Development

## 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.
17 changes: 17 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace: radiorabe
name: rabe_galaxy
version: 0.0.0
readme: README.md
authors:
- Lucas Bickel <@hairmare>
description: GitOps our Zabbix
license_file: LICENSE
tags:
- radiorabe
- zabbix
dependencies:
community.zabbix: ">=1.9.0"
repository: https://github.com/radiorabe/ansible-collection-rabe_zabbix
documentation: https://github.com/radiorabe/ansible-collection-rabe_zabbix/blob/main/README.md
homepage: hhttps://github.com/radiorabe/ansible-collection-rabe_zabbix
issues: https://github.com/radiorabe/ansible-collection-rabe_zabbix/issues
1 change: 1 addition & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requires_ansible: ">=2.11,<2.17"
25 changes: 25 additions & 0 deletions roles/data_collection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ansible Role - radiorabe.rabe_zabbix.data_collection

Manages Infrastructure in Zabbix using Foreman.

## Role Variables

This role does not expose any variables.

## Dependencies

The `radiorabe.rabe_zabbix.data_collection` role depends on the [`community.zabbix`](https://galaxy.ansible.com/community/zabbix/) collection.

## Example Playbooks

```yaml
- name: Configure Zabbix Data Collection
hosts: localhost
gather_facts: false
roles:
- role: radiorabe.rabe_zabbix.data_collection
```
## License
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.
16 changes: 16 additions & 0 deletions roles/data_collection/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
galaxy_info:
author: RaBe IT-Reaktion
description: Manage Zabbix data collection
issue_tracker_url: https://github.com/radiorabe/ansible-collection-rabe_zabbix/issues
license: AGPL-3.0-only
min_ansible_version: '2.9'
platforms:
- name: EL
versions:
- all
- name: Fedora
version:
- all
galaxy_tags:
- radiorabe
- zabbix
42 changes: 42 additions & 0 deletions roles/data_collection/tasks/host_groups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
- name: 'RaBe Zabbix Data Collection : Host Group'
vars:
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
ansible_httpapi_port: 443
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_host: '{{ zabbix_api_server_url }}'
community.zabbix.zabbix_group:
state: present
host_groups:
# please keep these alpha sorted in here
- 'RaBe: Axia Audio Devices - P1'
- 'RaBe: Axia Audio Devices - P3'
- 'RaBe: Network Gateways - P1'
- 'RaBe: Network Gateways - P3'
- 'RaBe: Network Switches - P1'
- 'RaBe: Network Switches - P3'
- 'RaBe: Network WLAN APs - P1'
- 'RaBe: Physical Office PCs - P3'
- 'RaBe: Physical Player PCs - P1'
- 'RaBe: Physical Servers - P1'
- 'RaBe: Service Audio Archive - P1'
- 'RaBe: Service Audio Monitoring - P1'
- 'RaBe: Service Audio Streaming - P1'
- 'RaBe: Service Audio Streaming - P3'
- 'RaBe: Service Backup - P1'
- 'RaBe: Service DAB - P1'
- 'RaBe: Service FreeIPA - P1'
- 'RaBe: Service Klangbecken - P1'
- 'RaBe: Service Libretime - P1'
- 'RaBe: Service Logging - P1'
- 'RaBe: Service Monitoring - P1'
- 'RaBe: Service Outside Broadcast - P1'
- 'RaBe: Service oVirt - P1'
- 'RaBe: Service PostgreSQL - P1'
- 'RaBe: Service Spacewalk - P1'
- 'RaBe: Service Studio WallTime - P3'
- 'RaBe: Virtual Machines - P1'
- 'RaBe: Virtual Machines - P3'
- 'RaBe: Websites and Webservices - P1'
10 changes: 10 additions & 0 deletions roles/data_collection/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: 'RaBe Zabbix : Set API Key'
ansible.builtin.set_fact:
ansible_zabbix_auth_key: '{{ rabe_zabbix_auth_key }}'

- name: 'RaBe Zabbix Data Collection : Host Group'
ansible.builtin.import_tasks: host_groups.yaml
tags:
- role::rabe_zabbix.data_collection
- role::rabe_zabbix.data_collection:host_groups

0 comments on commit b65f969

Please sign in to comment.