OpenBSD adaptation
This commit is contained in:
parent
7a0786d2d5
commit
1401957497
|
@ -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
|
||||
|
||||
|
|
3
roles/client_iptables/vars/OpenBSD.yml
Normal file
3
roles/client_iptables/vars/OpenBSD.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
# PF is used on OpenBSD (not iptables)
|
||||
configure_iptables: false
|
|
@ -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 }}"
|
||||
|
|
4
roles/munin-async/vars/OpenBSD.yml
Normal file
4
roles/munin-async/vars/OpenBSD.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
munin_async_service_name: munin_asyncd
|
||||
munin_async_package: munin-node
|
||||
munin_async_user: "munin-async"
|
|
@ -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: ''
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
- name: restart munin-node
|
||||
service: name=munin-node state=restarted
|
||||
service: name="{{ munin_node_service }}" state=restarted
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
6
roles/munin-node/vars/OpenBSD.yml
Normal file
6
roles/munin-node/vars/OpenBSD.yml
Normal 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
|
Loading…
Reference in a new issue