OpenBSD adaptation
This commit is contained in:
parent
7a0786d2d5
commit
1401957497
|
@ -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
|
|
||||||
|
|
||||||
|
|
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
|
- name: Set up authorized key for Munin async user
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "{{ munin_async_user }}"
|
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_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: ''
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
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