OpenBSD adaptation

This commit is contained in:
Nemo 2020-08-23 17:55:09 +02:00
parent 7a0786d2d5
commit 1401957497
9 changed files with 39 additions and 13 deletions

View File

@ -1,8 +1,8 @@
# Command to run to execute a Gentoo update
#cron_upgrade_job: emerge --sync --quiet && emerge --quiet-build -uvDN @world && /usr/sbin/perl-cleaner --all -q && emerge --quiet-build @preserved-rebuild && emerge --depclean && eselect news read
cron_upgrade_job: emerge --sync --quiet && emerge --quiet-build -uvDN @world && /usr/sbin/perl-cleaner --all -q && emerge --quiet-build @preserved-rebuild && emerge --depclean && eselect news read
# Tools to install on Gentoo hosts
#tools_package:
tools_package:
- bind-tools
- vim
- tcpdump
@ -17,6 +17,3 @@
- jq
- mailutils
# PF for OpenBSD (not iptables)
configure_iptables: false

View File

@ -0,0 +1,3 @@
---
# PF is used on OpenBSD (not iptables)
configure_iptables: false

View File

@ -1,4 +1,10 @@
---
- name: "Munin user for remote access created"
user:
name: "{{ munin_async_user }}"
password: "!"
when: ansible_os_family == 'OpenBSD'
- name: Set up authorized key for Munin async user
authorized_key:
user: "{{ munin_async_user }}"

View File

@ -0,0 +1,4 @@
---
munin_async_service_name: munin_asyncd
munin_async_package: munin-node
munin_async_user: "munin-async"

View File

@ -1,6 +1,9 @@
---
munin_node_bind_host: "*"
munin_node_bind_port: "4949"
munin_node_user: root
munin_node_group: root
munin_node_service: munin-node
munin_node_host_name: ''

View File

@ -1,3 +1,3 @@
---
- name: restart munin-node
service: name=munin-node state=restarted
service: name="{{ munin_node_service }}" state=restarted

View File

@ -28,12 +28,19 @@
when: ansible_os_family == 'Gentoo'
notify: restart munin-node
- name: Ensure munin (node) is installed (OpenBSD).
openbsd_pkg:
name: munin-node
state: latest
when: ansible_os_family == 'OpenBSD'
notify: restart munin-node
- name: Copy munin-node configuration.
template:
src: munin-node.conf.j2
dest: /etc/munin/munin-node.conf
owner: root
group: root
owner: "{{ munin_node_user }}"
group: "{{ munin_node_group }}"
mode: 0644
notify: restart munin-node
@ -41,8 +48,8 @@
template:
src: plugin-conf.j2
dest: /etc/munin/plugin-conf.d/ansible.conf
owner: root
group: root
owner: "{{ munin_node_user }}"
group: "{{ munin_node_group }}"
mode: 0644
notify: restart munin-node
@ -55,4 +62,4 @@
notify: restart munin-node
- name: Ensure munin-node is running.
service: name=munin-node state=started enabled=yes
service: name="{{ munin_node_service }}" state=started enabled=yes

View File

@ -9,8 +9,8 @@ pid_file {{ munin_node_pid }}
background 1
setsid 1
user root
group root
user {{ munin_node_user }}
group {{ munin_node_group }}
# This is the timeout for the whole transaction.
# Units are in sec. Default is 15 min

View File

@ -0,0 +1,6 @@
---
munin_node_log: /var/log/munin/munin-node.log
munin_node_pid: /var/run/munin-node.pid
munin_plugin_src_path: /usr/local/libexec/munin/plugins
munin_node_service: munin_node
munin_node_group: wheel