-numerous changes to work with Raspbian 10
-redo of some roles, particularly GUI -modifications to support working from a "Raspbian Lite" install
This commit is contained in:
104
playbook.yaml
Executable file → Normal file
104
playbook.yaml
Executable file → Normal file
@@ -1,52 +1,52 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Upgrade all packages o the latest version
|
||||
become: true
|
||||
apt:
|
||||
upgrade: yes
|
||||
update_cache: yes
|
||||
tags: apt_upgrade
|
||||
- hosts: pi
|
||||
tasks:
|
||||
- name: Install snmpd Package
|
||||
become: yes
|
||||
apt:
|
||||
name: ['snmpd']
|
||||
state: present
|
||||
update_cache: true
|
||||
tags: install_snmpd
|
||||
- lineinfile:
|
||||
path: /etc/snmp/snmpd.conf
|
||||
state: present
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
with_items:
|
||||
- { regexp: ' rocommunity public', line: ' rocommunity public' }
|
||||
- { regexp: 'agentAddress udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
||||
tags: configure_snmpd
|
||||
become: true
|
||||
- name: enable snmpd service and ensure it is not masked
|
||||
systemd:
|
||||
name: snmpd
|
||||
enabled: yes
|
||||
masked: no
|
||||
state: restarted
|
||||
tags: enablestart_snmpd
|
||||
become: true
|
||||
- name: set timezone
|
||||
become: true
|
||||
timezone:
|
||||
name: America/New_York
|
||||
tags: set_timezone
|
||||
|
||||
- hosts: smbclient
|
||||
tasks:
|
||||
- name: enable cron job for smb traffic
|
||||
cron:
|
||||
name: "smbtraff"
|
||||
minute: "*/20"
|
||||
hour: "7-18"
|
||||
weekday: "1-5"
|
||||
job: "/usr/bin/perl -e 'sleep int rand 1199' && /home/pi/scripts/smb-session.sh"
|
||||
tags: smbtraff_cron
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Upgrade all packages o the latest version
|
||||
become: true
|
||||
apt:
|
||||
upgrade: yes
|
||||
update_cache: yes
|
||||
tags: apt_upgrade
|
||||
- hosts: pi
|
||||
tasks:
|
||||
- name: Install snmpd Package
|
||||
become: yes
|
||||
apt:
|
||||
name: ['snmpd']
|
||||
state: present
|
||||
update_cache: true
|
||||
tags: install_snmpd
|
||||
- lineinfile:
|
||||
path: /etc/snmp/snmpd.conf
|
||||
state: present
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
with_items:
|
||||
- { regexp: ' rocommunity public', line: ' rocommunity public' }
|
||||
- { regexp: 'agentAddress udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
||||
tags: configure_snmpd
|
||||
become: true
|
||||
- name: enable snmpd service and ensure it is not masked
|
||||
systemd:
|
||||
name: snmpd
|
||||
enabled: yes
|
||||
masked: no
|
||||
state: restarted
|
||||
tags: enablestart_snmpd
|
||||
become: true
|
||||
- name: set timezone
|
||||
become: true
|
||||
timezone:
|
||||
name: America/New_York
|
||||
tags: set_timezone
|
||||
|
||||
- hosts: smbclient
|
||||
tasks:
|
||||
- name: enable cron job for smb traffic
|
||||
cron:
|
||||
name: "smbtraff"
|
||||
minute: "*/20"
|
||||
hour: "7-18"
|
||||
weekday: "1-5"
|
||||
job: "/usr/bin/perl -e 'sleep int rand 1199' && /home/pi/scripts/smb-session.sh"
|
||||
tags: smbtraff_cron
|
||||
|
||||
Reference in New Issue
Block a user