changed ansible host user & paths

main
WhatTheMike 2 years ago
parent 12df809250
commit 77dfea342d

@ -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:

@ -8,7 +8,7 @@
state: directory state: directory
- name: Ensure service tag script is present - name: Ensure service tag script is present
ansible.builtin.copy: ansible.builtin.copy:
src: /root/ansible/files/servicetag.sh src: ~/ansible/files/servicetag.sh
dest: /opt/ansible/servicetag.sh dest: /opt/ansible/servicetag.sh
mode: '0755' mode: '0755'
force: yes force: yes

@ -21,7 +21,7 @@
become_method: sudo become_method: sudo
- 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
@ -36,7 +36,7 @@
- name: Verify certificate script is deployed - name: Verify certificate script is deployed
ansible.builtin.template: ansible.builtin.template:
dest: /opt/sublight/scripts/collect-certdata.sh dest: /opt/sublight/scripts/collect-certdata.sh
src: /root/ansible/templates/collect-certdata.sh.j2 src: ~/ansible/templates/collect-certdata.sh.j2
mode: '0744' mode: '0744'
- name: Ensure cert monitoring script is scheduled - name: Ensure cert monitoring script is scheduled
ansible.builtin.cron: ansible.builtin.cron:

Loading…
Cancel
Save