Syntax : have all task name between quotes
This commit is contained in:
parent
e5d1dc96bb
commit
6667c4b9e8
|
@ -1,3 +1,4 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
---
|
---
|
||||||
- name: "Create {{ evobsd_internal_group }}, {{ evobsd_ssh_group }}, {{ evobsd_sudo_group }} group"
|
- name: "Create {{ evobsd_internal_group }}, {{ evobsd_ssh_group }}, {{ evobsd_sudo_group }} group"
|
||||||
group:
|
group:
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
tags:
|
tags:
|
||||||
- admin
|
- admin
|
||||||
|
|
||||||
- name: Create user accounts
|
- name: "Create user accounts"
|
||||||
include: user.yml
|
include: user.yml
|
||||||
vars:
|
vars:
|
||||||
user: "{{ item.value }}"
|
user: "{{ item.value }}"
|
||||||
|
@ -19,7 +20,7 @@
|
||||||
tags:
|
tags:
|
||||||
- admin
|
- admin
|
||||||
|
|
||||||
- name: verify AllowGroups directive
|
- name: "Verify AllowGroups directive"
|
||||||
command: "grep -E '^AllowGroups' /etc/ssh/sshd_config"
|
command: "grep -E '^AllowGroups' /etc/ssh/sshd_config"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
tags:
|
tags:
|
||||||
- admin
|
- admin
|
||||||
|
|
||||||
- name: verify AllowUsers directive
|
- name: "Verify AllowUsers directive"
|
||||||
command: "grep -E '^AllowUsers' /etc/ssh/sshd_config"
|
command: "grep -E '^AllowUsers' /etc/ssh/sshd_config"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
---
|
---
|
||||||
- name: "Group '{{ user.name }}' is present"
|
- name: "Group '{{ user.name }}' is present"
|
||||||
group:
|
group:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Customize PATH variable of root crontab
|
- name: "Customize PATH variable of root crontab"
|
||||||
cron:
|
cron:
|
||||||
name: PATH
|
name: PATH
|
||||||
env: true
|
env: true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Configure doas
|
- name: "Configure doas"
|
||||||
template:
|
template:
|
||||||
src: doas.conf.j2
|
src: doas.conf.j2
|
||||||
dest: /etc/doas.conf
|
dest: /etc/doas.conf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Customize root's .profile
|
- name: "Customize root's .profile"
|
||||||
template:
|
template:
|
||||||
src: profile.j2
|
src: profile.j2
|
||||||
dest: /root/.profile
|
dest: /root/.profile
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
- admin
|
- admin
|
||||||
- dotfiles
|
- dotfiles
|
||||||
|
|
||||||
- name: Copy vim default configuration
|
- name: "Copy vim default configuration"
|
||||||
copy:
|
copy:
|
||||||
src: vimrc
|
src: vimrc
|
||||||
dest: /root/.vimrc
|
dest: /root/.vimrc
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
- dotfiles
|
- dotfiles
|
||||||
- vim
|
- vim
|
||||||
|
|
||||||
- name: Customize .kshrc environment file
|
- name: "Customize .kshrc environment file"
|
||||||
copy:
|
copy:
|
||||||
src: kshrc
|
src: kshrc
|
||||||
dest: /root/.kshrc
|
dest: /root/.kshrc
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- admin
|
- admin
|
||||||
- dotfiles
|
- dotfiles
|
||||||
|
|
||||||
- name: Change default .profile skeleton
|
- name: "Change default .profile skeleton"
|
||||||
template:
|
template:
|
||||||
src: profile.j2
|
src: profile.j2
|
||||||
dest: /etc/skel/.profile
|
dest: /etc/skel/.profile
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
- admin
|
- admin
|
||||||
- dotfiles
|
- dotfiles
|
||||||
|
|
||||||
- name: Add evomaintenance trap .profile skeleton with doas
|
- name: "Add evomaintenance trap .profile skeleton with doas"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
state: present
|
state: present
|
||||||
dest: /etc/skel/.profile
|
dest: /etc/skel/.profile
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
- admin
|
- admin
|
||||||
- dotfiles
|
- dotfiles
|
||||||
|
|
||||||
- name: Add vim configuration to dotfiles for new users
|
- name: "Add vim configuration to dotfiles for new users"
|
||||||
copy:
|
copy:
|
||||||
src: vimrc
|
src: vimrc
|
||||||
dest: /etc/skel/.vimrc
|
dest: /etc/skel/.vimrc
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
- dotfiles
|
- dotfiles
|
||||||
- vim
|
- vim
|
||||||
|
|
||||||
- name: Customize .kshrc environment file for new users
|
- name: "Customize .kshrc environment file for new users"
|
||||||
copy:
|
copy:
|
||||||
src: kshrc
|
src: kshrc
|
||||||
dest: /etc/skel/.kshrc
|
dest: /etc/skel/.kshrc
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Copy zzz_evobackup script
|
- name: "Copy zzz_evobackup script"
|
||||||
copy:
|
copy:
|
||||||
src: zzz_evobackup
|
src: zzz_evobackup
|
||||||
dest: /usr/share/scripts/zzz_evobackup
|
dest: /usr/share/scripts/zzz_evobackup
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
- name: Fetch daily.local content
|
- name: "Fetch daily.local content"
|
||||||
command: 'grep "sh /usr/share/scripts/zzz_evobackup" /etc/daily.local'
|
command: 'grep "sh /usr/share/scripts/zzz_evobackup" /etc/daily.local'
|
||||||
check_mode: false
|
check_mode: false
|
||||||
register: daily_local_content
|
register: daily_local_content
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
- name: Add evobackup cron (disabled)
|
- name: "Add evobackup cron (disabled)"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: '#sh /usr/share/scripts/zzz_evobackup'
|
line: '#sh /usr/share/scripts/zzz_evobackup'
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
- name: Add evobackup cron - next_part
|
- name: "Add evobackup cron - next_part"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: 'next_part "EvoBackup output:"'
|
line: 'next_part "EvoBackup output:"'
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
- name: Delete legacy evobackup root crontab
|
- name: "Delete legacy evobackup root crontab"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /var/cron/tabs/root
|
path: /var/cron/tabs/root
|
||||||
regexp: '/usr/share/scripts/zzz_evobackup'
|
regexp: '/usr/share/scripts/zzz_evobackup'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Create scripts directory
|
- name: "Create scripts directory"
|
||||||
file:
|
file:
|
||||||
path: /usr/share/scripts/
|
path: /usr/share/scripts/
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evomaintenance
|
- evomaintenance
|
||||||
|
|
||||||
- name: Copy evomaintenance script and template
|
- name: "Copy evomaintenance script and template"
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- evomaintenance
|
- evomaintenance
|
||||||
- script-evomaintenance
|
- script-evomaintenance
|
||||||
|
|
||||||
- name: Configure evomaintenance
|
- name: "Configure evomaintenance"
|
||||||
template:
|
template:
|
||||||
src: evomaintenance.j2
|
src: evomaintenance.j2
|
||||||
dest: /etc/evomaintenance.cf
|
dest: /etc/evomaintenance.cf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Fetch fstab content
|
- name: "Fetch fstab content"
|
||||||
command: "grep -v '^#' /etc/fstab"
|
command: "grep -v '^#' /etc/fstab"
|
||||||
check_mode: false
|
check_mode: false
|
||||||
register: fstab_content
|
register: fstab_content
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: / partition is customized - softdep
|
- name: "/ partition is customized - softdep"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/\s+ffs\s+rw)(.*)'
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: / partition is customized - noatime
|
- name: "/ partition is customized - noatime"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/\s+ffs\s+rw)(\S*)(\s+.*)'
|
regexp: '([^#]\s+/\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /var partition is customized - softdep
|
- name: "/var partition is customized - softdep"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/var\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/var\s+ffs\s+rw)(.*)'
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /var partition is customized - noatime
|
- name: "/var partition is customized - noatime"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/var\s+ffs\s+rw)(\S*)(\s+.*)'
|
regexp: '([^#]\s+/var\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /usr partition is customized - softdep
|
- name: "/usr partition is customized - softdep"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/usr\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/usr\s+ffs\s+rw)(.*)'
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /usr partition is customized - noatime
|
- name: "/usr partition is customized - noatime"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/usr\s+ffs\s+rw)(\S*)(\s+.*)'
|
regexp: '([^#]\s+/usr\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /tmp partition is customized - noexec
|
- name: "/tmp partition is customized - noexec"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/tmp\s+ffs\s+rw(,softdep)*)(.*)'
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw(,softdep)*)(.*)'
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /tmp partition is customized - softdep
|
- name: "/tmp partition is customized - softdep"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(.*)'
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /tmp partition is customized - noatime
|
- name: "/tmp partition is customized - noatime"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(\S*)(\s+.*)'
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /home partition is customized - softdep
|
- name: "/home partition is customized - softdep"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/home\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/home\s+ffs\s+rw)(.*)'
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
- name: /home partition is customized - noatime
|
- name: "/home partition is customized - noatime"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/home\s+ffs\s+rw)(\S*)(\s+.*)'
|
regexp: '([^#]\s+/home\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Fetch rc.local content
|
- name: "Fetch rc.local content"
|
||||||
command: "grep -v '^#' /etc/rc.local"
|
command: "grep -v '^#' /etc/rc.local"
|
||||||
check_mode: false
|
check_mode: false
|
||||||
register: rclocal_content
|
register: rclocal_content
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- misc
|
- misc
|
||||||
|
|
||||||
- name: Configure rc.local
|
- name: "Configure rc.local"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/rc.local
|
path: /etc/rc.local
|
||||||
line:
|
line:
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
tags:
|
tags:
|
||||||
- misc
|
- misc
|
||||||
|
|
||||||
- name: Delete rc.local entry of boot/reboot not precising hostname
|
- name: "Delete rc.local entry of boot/reboot not precising hostname"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/rc.local
|
path: /etc/rc.local
|
||||||
regexp:
|
regexp:
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
tags:
|
tags:
|
||||||
- misc
|
- misc
|
||||||
|
|
||||||
- name: Set root mail alias
|
- name: "Set root mail alias"
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/mail/aliases
|
dest: /etc/mail/aliases
|
||||||
regexp: "# root:"
|
regexp: "# root:"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Customize newsyslog
|
- name: "Customize newsyslog"
|
||||||
copy:
|
copy:
|
||||||
src: newsyslog.conf
|
src: newsyslog.conf
|
||||||
dest: /etc/newsyslog.conf
|
dest: /etc/newsyslog.conf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Retrieve ntpd.conf content
|
- name: "Retrieve ntpd.conf content"
|
||||||
command: cat ntpd.conf
|
command: cat ntpd.conf
|
||||||
args:
|
args:
|
||||||
chdir: /etc/
|
chdir: /etc/
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
tags:
|
tags:
|
||||||
- ntp
|
- ntp
|
||||||
|
|
||||||
- name: Empty ntpd.conf before customizing it
|
- name: "Empty ntpd.conf before customizing it"
|
||||||
file:
|
file:
|
||||||
path: /etc/ntpd.conf
|
path: /etc/ntpd.conf
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
tags:
|
tags:
|
||||||
- ntp
|
- ntp
|
||||||
|
|
||||||
- name: Customize ntpd conf
|
- name: "Customize ntpd conf"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ntpd.conf
|
path: /etc/ntpd.conf
|
||||||
line: "server {{ ntpd_servers }}"
|
line: "server {{ ntpd_servers }}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Configure installurl
|
- name: "Configure installurl"
|
||||||
copy:
|
copy:
|
||||||
dest: /etc/installurl
|
dest: /etc/installurl
|
||||||
src: installurl
|
src: installurl
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- pkg
|
- pkg
|
||||||
|
|
||||||
- name: Install packages (vim rsync mtr etc)
|
- name: "Install packages (vim rsync mtr etc)"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name:
|
name:
|
||||||
- wget
|
- wget
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
tags:
|
tags:
|
||||||
- pkg
|
- pkg
|
||||||
|
|
||||||
- name: Disable sndiod
|
- name: "Disable sndiod"
|
||||||
service:
|
service:
|
||||||
name: sndiod
|
name: sndiod
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Configure sudoers umask
|
- name: "Configure sudoers umask"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
insertafter: '# Defaults specification'
|
insertafter: '# Defaults specification'
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- sudo
|
- sudo
|
||||||
|
|
||||||
- name: Allow wheel group to run command as root in sudo
|
- name: "Allow wheel group to run command as root in sudo"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
insertafter: '# and set environment variables.'
|
insertafter: '# and set environment variables.'
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
tags:
|
tags:
|
||||||
- sudo
|
- sudo
|
||||||
|
|
||||||
- name: Delete line with space instead of tab
|
- name: "Delete line with space instead of tab"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
line: "%wheel ALL=(ALL) SETENV: ALL"
|
line: "%wheel ALL=(ALL) SETENV: ALL"
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
tags:
|
tags:
|
||||||
- sudo
|
- sudo
|
||||||
|
|
||||||
- name: Configure sudoers for evomaintenance and monitoring
|
- name: "Configure sudoers for evomaintenance and monitoring"
|
||||||
blockinfile:
|
blockinfile:
|
||||||
state: present
|
state: present
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: dump-server-state script is present
|
- name: "dump-server-state script is present"
|
||||||
copy:
|
copy:
|
||||||
src: "dump-server-state.sh"
|
src: "dump-server-state.sh"
|
||||||
dest: /usr/local/sbin/dump-server-state
|
dest: /usr/local/sbin/dump-server-state
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
tags:
|
tags:
|
||||||
- utils
|
- utils
|
||||||
|
|
||||||
- name: update-evobackup-canary script is present
|
- name: "update-evobackup-canary script is present"
|
||||||
copy:
|
copy:
|
||||||
src: "update-evobackup-canary"
|
src: "update-evobackup-canary"
|
||||||
dest: /usr/local/bin/update-evobackup-canary
|
dest: /usr/local/bin/update-evobackup-canary
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Deploy bgp check script
|
- name: "Deploy bgp check script"
|
||||||
template:
|
template:
|
||||||
src: bgpd-check-peers.sh.j2
|
src: bgpd-check-peers.sh.j2
|
||||||
dest: /usr/share/scripts/bgpd-check-peers.sh
|
dest: /usr/share/scripts/bgpd-check-peers.sh
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
tags:
|
tags:
|
||||||
- bgp
|
- bgp
|
||||||
|
|
||||||
- name: Cron job for bgp check script is installed
|
- name: "Cron job for bgp check script is installed"
|
||||||
cron:
|
cron:
|
||||||
name: bgp check
|
name: bgp check
|
||||||
job: "/bin/sh /usr/share/scripts/bgpd-check-peers.sh"
|
job: "/bin/sh /usr/share/scripts/bgpd-check-peers.sh"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
tags:
|
tags:
|
||||||
- bgp
|
- bgp
|
||||||
|
|
||||||
- name: Create bgp log directory
|
- name: "Create bgp log directory"
|
||||||
file:
|
file:
|
||||||
path: /var/log/bgp
|
path: /var/log/bgp
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
tags:
|
tags:
|
||||||
- bgp
|
- bgp
|
||||||
|
|
||||||
- name: daily best routes cron job is installed
|
- name: "Daily best routes cron job is installed"
|
||||||
cron:
|
cron:
|
||||||
name: bgp best routes
|
name: bgp best routes
|
||||||
minute: 0
|
minute: 0
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
tags:
|
tags:
|
||||||
- bgp
|
- bgp
|
||||||
|
|
||||||
- name: weekly best routes clean up cron job is installed
|
- name: "Weekly best routes clean up cron job is installed"
|
||||||
cron:
|
cron:
|
||||||
name: bgp best routes clean up
|
name: bgp best routes clean up
|
||||||
minute: 0
|
minute: 0
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
---
|
---
|
||||||
- name: Install Collectd package
|
- name: "Install Collectd package"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name: "collectd"
|
name: "collectd"
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Deploy Collectd configuration
|
- name: "Deploy Collectd configuration"
|
||||||
template:
|
template:
|
||||||
src: "collectd.conf.j2"
|
src: "collectd.conf.j2"
|
||||||
dest: "/etc/collectd.conf"
|
dest: "/etc/collectd.conf"
|
||||||
|
@ -13,14 +14,14 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Enabling Collectd
|
- name: "Enabling Collectd"
|
||||||
service:
|
service:
|
||||||
name: collectd
|
name: collectd
|
||||||
enabled: true
|
enabled: true
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Create scripts directory for exec plugins
|
- name: "Create scripts directory for exec plugins"
|
||||||
file:
|
file:
|
||||||
path: /usr/local/share/collectd/scripts
|
path: /usr/local/share/collectd/scripts
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Copy ifq_drops.sh
|
- name: "Copy ifq_drops.sh"
|
||||||
copy:
|
copy:
|
||||||
src: ifq_drops.sh
|
src: ifq_drops.sh
|
||||||
dest: /usr/local/share/collectd/scripts/ifq_drops.sh
|
dest: /usr/local/share/collectd/scripts/ifq_drops.sh
|
||||||
|
@ -38,7 +39,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Remove ifq_drops.sh
|
- name: "Remove ifq_drops.sh"
|
||||||
file:
|
file:
|
||||||
path: /usr/local/share/collectd/scripts/ifq_drops.sh
|
path: /usr/local/share/collectd/scripts/ifq_drops.sh
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Copy dns_stats.sh
|
- name: "Copy dns_stats.sh"
|
||||||
copy:
|
copy:
|
||||||
src: dns_stats.sh
|
src: dns_stats.sh
|
||||||
dest: /usr/local/share/collectd/scripts/dns_stats.sh
|
dest: /usr/local/share/collectd/scripts/dns_stats.sh
|
||||||
|
@ -56,7 +57,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Add stats DNS on unbound
|
- name: "Add stats DNS on unbound"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /var/unbound/etc/unbound.conf
|
path: /var/unbound/etc/unbound.conf
|
||||||
regexp: 'statistics-interval'
|
regexp: 'statistics-interval'
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Remove dns_stats.sh
|
- name: "Remove dns_stats.sh"
|
||||||
file:
|
file:
|
||||||
path: /usr/local/share/collectd/scripts/dns_stats.sh
|
path: /usr/local/share/collectd/scripts/dns_stats.sh
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -77,7 +78,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Remove stats DNS on unbound
|
- name: "Remove stats DNS on unbound"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /var/unbound/etc/unbound.conf
|
path: /var/unbound/etc/unbound.conf
|
||||||
regexp: 'statistics-interval'
|
regexp: 'statistics-interval'
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Add doas configuration for dns_stats.sh execution
|
- name: "Add doas configuration for dns_stats.sh execution"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/doas.conf
|
path: /etc/doas.conf
|
||||||
line: 'permit nopass _collectd as root cmd /bin/cat'
|
line: 'permit nopass _collectd as root cmd /bin/cat'
|
||||||
|
@ -96,7 +97,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Copy dhcp_pool.pl
|
- name: "Copy dhcp_pool.pl"
|
||||||
copy:
|
copy:
|
||||||
src: dhcp_pool.pl
|
src: dhcp_pool.pl
|
||||||
dest: /usr/local/share/collectd/scripts/dhcp_pool.pl
|
dest: /usr/local/share/collectd/scripts/dhcp_pool.pl
|
||||||
|
@ -106,7 +107,7 @@
|
||||||
tags:
|
tags:
|
||||||
- collectd
|
- collectd
|
||||||
|
|
||||||
- name: Remove dhcp_pool.pl
|
- name: "Remove dhcp_pool.pl"
|
||||||
file:
|
file:
|
||||||
path: /usr/local/share/collectd/scripts/dhcp_pool.pl
|
path: /usr/local/share/collectd/scripts/dhcp_pool.pl
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: "Execute ansible-commit"
|
- name: "Execute ansible-commit"
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Git is installed
|
- name: "Git is installed"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name: git
|
name: git
|
||||||
state: present
|
state: present
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Install and configure utilities
|
- name: "Install and configure utilities"
|
||||||
include: utils.yml
|
include: utils.yml
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Configure repositories
|
- name: "Configure repositories"
|
||||||
include: repositories.yml
|
include: repositories.yml
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: verify /usr/share/scripts presence
|
- name: "Verify /usr/share/scripts presence"
|
||||||
stat:
|
stat:
|
||||||
path: /usr/share/scripts
|
path: /usr/share/scripts
|
||||||
register: _usr_share_scripts
|
register: _usr_share_scripts
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Git user.email is configured
|
- name: "Git user.email is configured"
|
||||||
git_config:
|
git_config:
|
||||||
name: user.email
|
name: user.email
|
||||||
repo: "{{ repository_path }}"
|
repo: "{{ repository_path }}"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Set vim as default editor
|
- name: "Set vim as default editor"
|
||||||
git_config:
|
git_config:
|
||||||
name: core.editor
|
name: core.editor
|
||||||
scope: global
|
scope: global
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: "does {{ repository_path }}/ have any commit?"
|
- name: "Does {{ repository_path }}/ have any commit?"
|
||||||
command: "git log"
|
command: "git log"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ repository_path }}"
|
chdir: "{{ repository_path }}"
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: initial commit is present?
|
- name: "Initial commit is present?"
|
||||||
shell: "git add -A . && git commit -m \"Initial commit via Ansible\""
|
shell: "git add -A . && git commit -m \"Initial commit via Ansible\""
|
||||||
args:
|
args:
|
||||||
chdir: "{{ repository_path }}"
|
chdir: "{{ repository_path }}"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
# yamllint disable rule:line-length
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: evocommit script is installed
|
- name: "evocommit script is installed"
|
||||||
copy:
|
copy:
|
||||||
src: evocommit
|
src: evocommit
|
||||||
dest: /usr/local/bin/evocommit
|
dest: /usr/local/bin/evocommit
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: etc-git-optimize script is installed
|
- name: "etc-git-optimize script is installed"
|
||||||
copy:
|
copy:
|
||||||
src: etc-git-optimize
|
src: etc-git-optimize
|
||||||
dest: /usr/share/scripts/etc-git-optimize
|
dest: /usr/share/scripts/etc-git-optimize
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: etc-git-status script is installed
|
- name: "etc-git-status script is installed"
|
||||||
copy:
|
copy:
|
||||||
src: etc-git-status
|
src: etc-git-status
|
||||||
dest: /usr/share/scripts/etc-git-status
|
dest: /usr/share/scripts/etc-git-status
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Legacy monthly cron job for /etc/.git optimization is absent
|
- name: "Legacy monthly cron job for /etc/.git optimization is absent"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/monthly.local
|
path: /etc/monthly.local
|
||||||
line: '/usr/local/bin/git --git-dir /etc/.git gc --quiet'
|
line: '/usr/local/bin/git --git-dir /etc/.git gc --quiet'
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Legacy hourly cron job for /etc/.git status is absent
|
- name: "Legacy hourly cron job for /etc/.git status is absent"
|
||||||
cron:
|
cron:
|
||||||
name: git status
|
name: git status
|
||||||
minute: "42"
|
minute: "42"
|
||||||
|
@ -53,7 +54,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Legacy daily cron jobs for /etc/.git status are absent
|
- name: "Legacy daily cron jobs for /etc/.git status are absent"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: "{{ item }}"
|
line: "{{ item }}"
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for monthly git optimization
|
- name: "Cron job for monthly git optimization"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/monthly.local
|
path: /etc/monthly.local
|
||||||
line: "/usr/share/scripts/etc-git-optimize"
|
line: "/usr/share/scripts/etc-git-optimize"
|
||||||
|
@ -76,7 +77,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for monthly git optimization - next_part
|
- name: "Cron job for monthly git optimization - next_part"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/monthly.local
|
path: /etc/monthly.local
|
||||||
line: 'next_part "Monthly optimization:"'
|
line: 'next_part "Monthly optimization:"'
|
||||||
|
@ -87,7 +88,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for hourly git status
|
- name: "Cron job for hourly git status"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/hourly.local
|
path: /etc/hourly.local
|
||||||
line: "who > /dev/null || /usr/share/scripts/etc-git-status"
|
line: "who > /dev/null || /usr/share/scripts/etc-git-status"
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for hourly git status - next_part
|
- name: "Cron job for hourly git status - next_part"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/hourly.local
|
path: /etc/hourly.local
|
||||||
line: 'next_part "Hourly warning for unclean Git repository if nobody is connected:"'
|
line: 'next_part "Hourly warning for unclean Git repository if nobody is connected:"'
|
||||||
|
@ -110,7 +111,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for daily git status
|
- name: "Cron job for daily git status"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: "/usr/share/scripts/etc-git-status"
|
line: "/usr/share/scripts/etc-git-status"
|
||||||
|
@ -121,7 +122,7 @@
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: Cron job for daily git status - next_part
|
- name: "Cron job for daily git status - next_part"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: 'next_part "Daily warning for unclean Git repository:"'
|
line: 'next_part "Daily warning for unclean Git repository:"'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: run evocheck
|
- name: "Run evocheck"
|
||||||
command: "{{ evocheck_bin_dir }}/evocheck.sh"
|
command: "{{ evocheck_bin_dir }}/evocheck.sh"
|
||||||
register: evocheck_run
|
register: evocheck_run
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Scripts dir is present
|
- name: "Scripts dir is present"
|
||||||
file:
|
file:
|
||||||
path: "{{ evocheck_bin_dir }}"
|
path: "{{ evocheck_bin_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evocheck
|
- evocheck
|
||||||
|
|
||||||
- name: Copy evocheck.sh
|
- name: "Copy evocheck.sh"
|
||||||
copy:
|
copy:
|
||||||
src: evocheck.sh
|
src: evocheck.sh
|
||||||
dest: "{{ evocheck_bin_dir }}/evocheck.sh"
|
dest: "{{ evocheck_bin_dir }}/evocheck.sh"
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evocheck
|
- evocheck
|
||||||
|
|
||||||
- name: Copy evocheck.cf
|
- name: "Copy evocheck.cf"
|
||||||
copy:
|
copy:
|
||||||
src: evocheck.cf
|
src: evocheck.cf
|
||||||
dest: /etc/evocheck.cf
|
dest: /etc/evocheck.cf
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evocheck
|
- evocheck
|
||||||
|
|
||||||
- name: Add evocheck cron
|
- name: "Add evocheck cron"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
insertbefore: BOF
|
insertbefore: BOF
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
tags:
|
tags:
|
||||||
- evocheck
|
- evocheck
|
||||||
|
|
||||||
- name: Add evocheck cron - next_part
|
- name: "Add evocheck cron - next_part"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/daily.local
|
path: /etc/daily.local
|
||||||
line: 'next_part "Evocheck output:"'
|
line: 'next_part "Evocheck output:"'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Enable IPv4 forwarding
|
- name: "Enable IPv4 forwarding"
|
||||||
sysctl:
|
sysctl:
|
||||||
name: net.inet.ip.forwarding
|
name: net.inet.ip.forwarding
|
||||||
value: "1"
|
value: "1"
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
tags:
|
tags:
|
||||||
- net
|
- net
|
||||||
|
|
||||||
- name: Enable IPv6 forwarding
|
- name: "Enable IPv6 forwarding"
|
||||||
sysctl:
|
sysctl:
|
||||||
name: net.inet6.ip6.forwarding
|
name: net.inet6.ip6.forwarding
|
||||||
value: "1"
|
value: "1"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Install logsentry
|
- name: "Install logsentry"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name:
|
name:
|
||||||
- logsentry--
|
- logsentry--
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
tags:
|
tags:
|
||||||
- logsentry
|
- logsentry
|
||||||
|
|
||||||
- name: Copy logsentry script to /usr/share/scripts
|
- name: "Copy logsentry script to /usr/share/scripts"
|
||||||
copy:
|
copy:
|
||||||
src: logsentry.sh
|
src: logsentry.sh
|
||||||
dest: /usr/share/scripts/logsentry.sh
|
dest: /usr/share/scripts/logsentry.sh
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
tags:
|
tags:
|
||||||
- logsentry
|
- logsentry
|
||||||
|
|
||||||
- name: Copy logsentry.ignore configuration
|
- name: "Copy logsentry.ignore configuration"
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: /etc/logsentry/logsentry.ignore
|
dest: /etc/logsentry/logsentry.ignore
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
- logsentry
|
- logsentry
|
||||||
- config
|
- config
|
||||||
|
|
||||||
- name: Copy logsentry.violations.ignore configuration
|
- name: "Copy logsentry.violations.ignore configuration"
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: /etc/logsentry/logsentry.violations.ignore
|
dest: /etc/logsentry/logsentry.violations.ignore
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
- logsentry
|
- logsentry
|
||||||
- config
|
- config
|
||||||
|
|
||||||
- name: hourly cron job for logsentry.sh is installed
|
- name: "Hourly cron job for logsentry.sh is installed"
|
||||||
cron:
|
cron:
|
||||||
name: logsentry
|
name: logsentry
|
||||||
minute: "11"
|
minute: "11"
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
- name: Install nrpe
|
- name: "Install nrpe"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name:
|
name:
|
||||||
- nrpe--
|
- nrpe--
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Install monitoring packages
|
- name: "Install monitoring packages"
|
||||||
openbsd_pkg:
|
openbsd_pkg:
|
||||||
name:
|
name:
|
||||||
- monitoring-plugins
|
- monitoring-plugins
|
||||||
- check_bioctl
|
- check_bioctl
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create nrpe.d dir
|
- name: "Create nrpe.d dir"
|
||||||
file:
|
file:
|
||||||
path: /etc/nrpe.d
|
path: /etc/nrpe.d
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -20,19 +20,19 @@
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Include nrpe.d dir in nrpe.cfg
|
- name: "Include nrpe.d dir in nrpe.cfg"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/nrpe.cfg
|
dest: /etc/nrpe.cfg
|
||||||
line: 'include_dir=/etc/nrpe.d'
|
line: 'include_dir=/etc/nrpe.d'
|
||||||
|
|
||||||
- name: custom configuration is present
|
- name: "Custom configuration is present"
|
||||||
template:
|
template:
|
||||||
src: evolix_bsd.cfg.j2
|
src: evolix_bsd.cfg.j2
|
||||||
dest: /etc/nrpe.d/evolix.cfg
|
dest: /etc/nrpe.d/evolix.cfg
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: restart nrpe
|
notify: restart nrpe
|
||||||
|
|
||||||
- name: Create nrpe plugins dir
|
- name: "Create nrpe plugins dir"
|
||||||
file:
|
file:
|
||||||
path: /usr/local/libexec/nagios/plugins/
|
path: /usr/local/libexec/nagios/plugins/
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Nagios plugins are installed
|
- name: "Nagios plugins are installed"
|
||||||
copy:
|
copy:
|
||||||
src: plugins_bsd/{{ item.name }}
|
src: plugins_bsd/{{ item.name }}
|
||||||
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
- {name: 'check_dhcpd.sh', force: false}
|
- {name: 'check_dhcpd.sh', force: false}
|
||||||
notify: restart nrpe
|
notify: restart nrpe
|
||||||
|
|
||||||
- name: Nagios plugins are installed - template
|
- name: "Nagios plugins are installed - template"
|
||||||
template:
|
template:
|
||||||
src: plugins_bsd/{{ item.name }}.j2
|
src: plugins_bsd/{{ item.name }}.j2
|
||||||
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
dest: /usr/local/libexec/nagios/plugins/{{ item.name }}
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
- {name: 'check_free_mem.sh', force: true}
|
- {name: 'check_free_mem.sh', force: true}
|
||||||
notify: restart nrpe
|
notify: restart nrpe
|
||||||
|
|
||||||
- name: Starting and enabling nrpe
|
- name: "Starting and enabling nrpe"
|
||||||
service:
|
service:
|
||||||
name: nrpe
|
name: nrpe
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Deploy ospf check scripts
|
- name: "Deploy ospf check scripts"
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
dest: /usr/share/scripts/{{ item }}
|
dest: /usr/share/scripts/{{ item }}
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
tags:
|
tags:
|
||||||
- ospf
|
- ospf
|
||||||
|
|
||||||
- name: Cron job for ospf check scripts is installed
|
- name: "Cron job for ospf check scripts is installed"
|
||||||
cron:
|
cron:
|
||||||
name: "{{ item }} check"
|
name: "{{ item }} check"
|
||||||
job: "/bin/sh /usr/share/scripts/{{ item }}-check-peers.sh"
|
job: "/bin/sh /usr/share/scripts/{{ item }}-check-peers.sh"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Setup pf.conf
|
- name: "Setup pf.conf"
|
||||||
template:
|
template:
|
||||||
src: pf.conf.j2
|
src: pf.conf.j2
|
||||||
dest: /etc/pf.conf
|
dest: /etc/pf.conf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: "copy generateldif.sh"
|
- name: "Copy generateldif.sh"
|
||||||
template:
|
template:
|
||||||
src: generateldif.sh.j2
|
src: generateldif.sh.j2
|
||||||
dest: '{{ general_scripts_dir }}/generateldif.sh'
|
dest: '{{ general_scripts_dir }}/generateldif.sh'
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: "0750"
|
mode: "0750"
|
||||||
|
|
||||||
- name: run generateldif
|
- name: "Run generateldif"
|
||||||
command: '{{ general_scripts_dir }}/generateldif.sh'
|
command: '{{ general_scripts_dir }}/generateldif.sh'
|
||||||
register: generateldif_run
|
register: generateldif_run
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Deploy dynamic motd script for CARP master or backup
|
- name: "Deploy dynamic motd script for CARP master or backup"
|
||||||
copy:
|
copy:
|
||||||
src: motd-carp-state.sh
|
src: motd-carp-state.sh
|
||||||
dest: /usr/share/scripts/motd-carp-state.sh
|
dest: /usr/share/scripts/motd-carp-state.sh
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
group: wheel
|
group: wheel
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Fetch root crontab content
|
- name: "Fetch root crontab content"
|
||||||
command: >
|
command: >
|
||||||
grep "/bin/sh /usr/share/scripts/motd-carp-state.sh" /var/cron/tabs/root
|
grep "/bin/sh /usr/share/scripts/motd-carp-state.sh" /var/cron/tabs/root
|
||||||
check_mode: false
|
check_mode: false
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Cron job for dynamic motd script is installed
|
- name: "Cron job for dynamic motd script is installed"
|
||||||
cron:
|
cron:
|
||||||
name: dynamic motd for CARP
|
name: dynamic motd for CARP
|
||||||
job: "/bin/sh /usr/share/scripts/motd-carp-state.sh"
|
job: "/bin/sh /usr/share/scripts/motd-carp-state.sh"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Check and install updates (erratas) if available
|
- name: "Check and install updates (erratas) if available"
|
||||||
command: /usr/sbin/syspatch
|
command: /usr/sbin/syspatch
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: ansible_distribution_version is version_compare("6.1",'>=')
|
when: ansible_distribution_version is version_compare("6.1",'>=')
|
||||||
|
|
Loading…
Reference in a new issue