|
|
@ -65,7 +65,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- name: Download vim config from aperture (root)
|
|
|
|
- name: Download vim config from aperture (root)
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
dest: /root/.vimrc
|
|
|
|
dest: ~/.vimrc
|
|
|
|
url: https://aperture.dismyserver.net/.vimrc
|
|
|
|
url: https://aperture.dismyserver.net/.vimrc
|
|
|
|
become: true
|
|
|
|
become: true
|
|
|
|
become_method: sudo
|
|
|
|
become_method: sudo
|
|
|
@ -128,19 +128,20 @@
|
|
|
|
- name: Verify python template is deployed
|
|
|
|
- name: Verify python template is deployed
|
|
|
|
ansible.builtin.template:
|
|
|
|
ansible.builtin.template:
|
|
|
|
dest: /home/pi/telegraf-nut-input/input.py
|
|
|
|
dest: /home/pi/telegraf-nut-input/input.py
|
|
|
|
src: /root/ansible/templates/nut-telegraf-input.py.j2
|
|
|
|
src: ~/ansible/templates/nut-telegraf-input.py.j2
|
|
|
|
mode: '0644'
|
|
|
|
mode: '0644'
|
|
|
|
- name: Verify telegraf template is deployed
|
|
|
|
- name: Verify telegraf template is deployed
|
|
|
|
ansible.builtin.template:
|
|
|
|
ansible.builtin.template:
|
|
|
|
dest: /etc/telegraf/telegraf.d/nut-telegraf.conf
|
|
|
|
dest: /etc/telegraf/telegraf.d/nut-telegraf.conf
|
|
|
|
mode: '0644'
|
|
|
|
mode: '0644'
|
|
|
|
src: /root/ansible/templates/nut-telegraf.conf.j2
|
|
|
|
src: ~/ansible/templates/nut-telegraf.conf.j2
|
|
|
|
become: true
|
|
|
|
become: true
|
|
|
|
become_method: sudo
|
|
|
|
become_method: sudo
|
|
|
|
|
|
|
|
register: telegraf_deployed
|
|
|
|
- name: Verify monitoring template is deployed
|
|
|
|
- name: Verify monitoring template is deployed
|
|
|
|
ansible.builtin.template:
|
|
|
|
ansible.builtin.template:
|
|
|
|
dest: /home/pi/nutmon.sh
|
|
|
|
dest: /home/pi/nutmon.sh
|
|
|
|
src: /root/ansible/templates/nutmon.sh.j2
|
|
|
|
src: ~/ansible/templates/nutmon.sh.j2
|
|
|
|
mode: '0755'
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure monitoring script is scheduled
|
|
|
|
- name: Ensure monitoring script is scheduled
|
|
|
@ -161,6 +162,7 @@
|
|
|
|
ignore_errors: true
|
|
|
|
ignore_errors: true
|
|
|
|
become: true
|
|
|
|
become: true
|
|
|
|
become_method: sudo
|
|
|
|
become_method: sudo
|
|
|
|
|
|
|
|
when: telegraf_deployed.changed
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check for OS required reboots
|
|
|
|
- name: Check for OS required reboots
|
|
|
|
ansible.builtin.stat:
|
|
|
|
ansible.builtin.stat:
|
|
|
|