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 # 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 to install on Gentoo hosts
#tools_package: tools_package:
- bind-tools - bind-tools
- vim - vim
- tcpdump - tcpdump
@ -17,6 +17,3 @@
- jq - jq
- mailutils - 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 - name: Set up authorized key for Munin async user
authorized_key: authorized_key:
user: "{{ munin_async_user }}" 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_host: "*"
munin_node_bind_port: "4949" munin_node_bind_port: "4949"
munin_node_user: root
munin_node_group: root
munin_node_service: munin-node
munin_node_host_name: '' munin_node_host_name: ''

View file

@ -1,3 +1,3 @@
--- ---
- name: restart munin-node - 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' when: ansible_os_family == 'Gentoo'
notify: restart munin-node 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. - name: Copy munin-node configuration.
template: template:
src: munin-node.conf.j2 src: munin-node.conf.j2
dest: /etc/munin/munin-node.conf dest: /etc/munin/munin-node.conf
owner: root owner: "{{ munin_node_user }}"
group: root group: "{{ munin_node_group }}"
mode: 0644 mode: 0644
notify: restart munin-node notify: restart munin-node
@ -41,8 +48,8 @@
template: template:
src: plugin-conf.j2 src: plugin-conf.j2
dest: /etc/munin/plugin-conf.d/ansible.conf dest: /etc/munin/plugin-conf.d/ansible.conf
owner: root owner: "{{ munin_node_user }}"
group: root group: "{{ munin_node_group }}"
mode: 0644 mode: 0644
notify: restart munin-node notify: restart munin-node
@ -55,4 +62,4 @@
notify: restart munin-node notify: restart munin-node
- name: Ensure munin-node is running. - 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 background 1
setsid 1 setsid 1
user root user {{ munin_node_user }}
group root group {{ munin_node_group }}
# This is the timeout for the whole transaction. # This is the timeout for the whole transaction.
# Units are in sec. Default is 15 min # 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