Compare commits

...

7 commits
v1.0.0 ... main

Author SHA1 Message Date
c11d46957a test: add forgejo workflow
All checks were successful
/ lint (push) Successful in 8s
/ molecule (push) Successful in 1m25s
2024-05-09 11:45:48 +02:00
965bec2314 chore: replace apt_key to get_url 2024-05-07 22:21:03 +02:00
deb2afb389 chore: fix syntax for ansible lint 2024-05-07 22:05:41 +02:00
b08f2eda4d fix: remove useless package icingaweb2-module-monitoring 2024-05-07 21:59:11 +02:00
ec977101f9 test: use personal docker registry 2024-05-07 20:21:44 +02:00
3eeb8a3112 feat: add debian 12 support 2024-03-13 21:44:59 +01:00
8903948a9f test: add gitlab-ci 2024-03-13 21:44:58 +01:00
10 changed files with 75 additions and 39 deletions

View file

@ -0,0 +1,18 @@
---
on: [push]
jobs:
lint:
runs-on: docker
container:
image: code.waks.be/nishiki/molecule:docker
steps:
- uses: actions/checkout@v3
- run: ansible-lint .
- run: yamllint .
molecule:
runs-on: docker
container:
image: code.waks.be/nishiki/molecule:docker
steps:
- uses: actions/checkout@v3
- run: molecule test

10
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,10 @@
---
image: nishiki/molecule:docker
before_script:
- molecule --version
molecule:
stage: test
script:
- molecule test

View file

@ -2,11 +2,11 @@
extends: default
ignore: |
.kitchen/*
.kitchen*
vendor/
.forgejo/
rules:
line-length:
max: 120
level: warning
truthy: false

View file

@ -5,6 +5,14 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
## [Unreleased]
### Changed
- test: use personal docker registry
### Removed
- test: remove support debian11
## v1.0.0 - 2021-08-18
### Added

View file

@ -1,16 +1,16 @@
# Ansible role: Icingaweb2
[![Version](https://img.shields.io/badge/latest_version-1.0.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-icingaweb2/releases)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-icingaweb2/src/branch/master/LICENSE)
[![Version](https://img.shields.io/badge/latest_version-1.0.0-green.svg)](https://code.waks.be/nishiki/ansible-role-icingaweb2/releases)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://code.waks.be/nishiki/ansible-role-icingaweb2/src/branch/main/LICENSE)
[![Build](https://code.waks.be/nishiki/ansible-role-icingaweb2/actions/workflows/molecule.yml/badge.svg?branch=main)](https://code.waks.be/nishiki/ansible-role-icingaweb2/actions?workflow=molecule.yml)
Install icingaweb2
## Requirements
* Ansible >= 2.9
* Debian
* Buster
* Bulleyes
- Ansible >= 2.9
- Debian
- Bookworm
## Role variables
@ -21,14 +21,15 @@ Install icingaweb2
roles:
- icingaweb2
```
## Development
### Test with molecule and docker
* install [docker](https://docs.docker.com/engine/installation/)
* install `python3` and `python3-pip`
* install molecule and dependencies `pip3 install molecule molecule-docker docker ansible-lint pytest-testinfra yamllint`
* run `molecule test`
- install [docker](https://docs.docker.com/engine/installation/)
- install `python3` and `python3-pip`
- install molecule and dependencies `pip3 install molecule molecule-docker docker ansible-lint pytest-testinfra yamllint`
- run `molecule test`
## License

View file

@ -1,5 +1,5 @@
---
- name: reload apache
- name: Reload apache
ansible.builtin.service:
name: apache2
state: reloaded

View file

@ -1,17 +1,17 @@
---
galaxy_info:
role_name: icingaweb2
namespace: nishiki
author: Adrien Waksberg
company: Adrien Waksberg
description: Install icingaweb2
license: Apache2
min_ansible_version: 2.9
min_ansible_version: "2.9"
platforms:
- name: Debian
versions:
- buster
- bullseye
- bookworm
galaxy_tags:
- dashboard

View file

@ -2,19 +2,12 @@
driver:
name: docker
platforms:
- name: debian10
image: nishiki/debian10:molecule
- name: debian12
image: code.waks.be/nishiki/molecule:debian12
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /bin/systemd
capabilities:
- SYS_ADMIN
- name: debian11
image: nishiki/debian10:molecule
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
command: /bin/systemd
capabilities:
- SYS_ADMIN

View file

@ -2,9 +2,8 @@ import os, re
import testinfra.utils.ansible_runner
def test_packages(host):
for package_name in ['icingaweb2', 'icingaweb2-module-monitoring']:
package = host.package(package_name)
assert package.is_installed
package = host.package('icingaweb2')
assert package.is_installed
def test_service(host):
service = host.service('apache2')

View file

@ -1,33 +1,40 @@
---
- name: install dependencies packages
- name: Install dependencies packages
ansible.builtin.package:
name:
- apt-transport-https
tags: icingaweb2
- name: add key repository
ansible.builtin.apt_key:
- name: Add repository key
ansible.builtin.get_url:
url: https://packages.icinga.com/icinga.key
dest: /etc/apt/keyrings/icinga.asc
owner: root
group: root
mode: 0644
checksum: sha256:be677e07972ed57b99ffc2fd211379ac11b9c6a7c8d9460086b447b96b0a82bb
tags: icingaweb2
- name: add repository
- name: Add repository
ansible.builtin.apt_repository:
repo: 'deb https://packages.icinga.com/debian icinga-{{ ansible_distribution_release }} main'
repo: >-
deb [signed-by=/etc/apt/keyrings/icinga.asc]
https://packages.icinga.com/debian icinga-{{ ansible_distribution_release }} main
filename: icinga
tags: icingaweb2
- name: install packages
- name: Install packages
ansible.builtin.package:
name:
- icingaweb2
- icingaweb2-module-monitoring
tags: icingaweb2
- name: enable apache configuration
- name: Enable apache configuration
ansible.builtin.file:
src: /etc/apache2/conf-available/icingaweb2.conf
dest: /etc/apache2/sites-enabled/icingaweb2.conf
owner: root
group: root
state: link
notify: reload apache
notify: Reload apache
tags: icingaweb2