-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:
4
ansible.cfg
Executable file → Normal file
4
ansible.cfg
Executable file → Normal file
@@ -68,7 +68,7 @@
|
||||
#roles_path = /etc/ansible/roles
|
||||
|
||||
# uncomment this to disable SSH key host checking
|
||||
#host_key_checking = False
|
||||
host_key_checking = False
|
||||
|
||||
# change the default callback, you can only have one 'stdout' type enabled at a time.
|
||||
#stdout_callback = skippy
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
# logging is off by default unless this path is defined
|
||||
# if so defined, consider logrotate
|
||||
log_path = /var/log/ansible.log
|
||||
log_path = ~/ansible.log
|
||||
|
||||
# default module name for /usr/bin/ansible
|
||||
#module_name = command
|
||||
|
||||
8
clean_hosts.yaml
Normal file
8
clean_hosts.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: clean hosts file
|
||||
become: true
|
||||
blockinfile:
|
||||
path: /etc/hosts
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||
content: ""
|
||||
tags: clean_hosts
|
||||
15
deploy_authorized_keys.yml
Normal file
15
deploy_authorized_keys.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: make direcotry
|
||||
file:
|
||||
path: "/home/pi/.ssh"
|
||||
state: directory
|
||||
- name: create empty file
|
||||
file:
|
||||
path: "/home/pi/.ssh/authorized_keys"
|
||||
state: touch
|
||||
- name: put pubkey
|
||||
lineinfile:
|
||||
path: "/home/pi/.ssh/authorized_keys"
|
||||
line: "{{ pubkey }}"
|
||||
102
hosts
Executable file → Normal file
102
hosts
Executable file → Normal file
@@ -1,108 +1,42 @@
|
||||
sdwcltm2 ansible_host=192.168.50.2 site_clli=CRHMNJAW
|
||||
sdwcltm3 ansible_host=192.168.201.55 site_clli=MTLRNJIK
|
||||
sdwcltm5 ansible_host=192.168.35.1 site_clli=PHLJPAMT
|
||||
sdwsrvm ansible_host=192.168.60.2 site_clli=WLGRPABW
|
||||
sdwcltm8 ansible_host=192.168.150.2 site_clli=FTCLCORN
|
||||
ubuntu-server-2 ansible_host=192.168.198.2 site_clli=CMCYCOJL
|
||||
sdwcltm7 ansible_host=192.168.199.2 site_clli=SRSPNYGN
|
||||
sdwsrvl ansible_host=192.168.90.2 site_clli=LSBGFL59
|
||||
sdwcltm4 ansible_host=192.168.100.2 site_clli=PROVUTZZ
|
||||
sdwcltm6 ansible_host=192.168.200.34 site_clli=PHLJPAMT
|
||||
ubuntu-server-1 ansible_host=192.168.201.2 site_clli=MTLRNJIK
|
||||
sdwcltm9 ansible_host=192.168.200.163 site_clli=NRCRGAQN
|
||||
#192.168.201.3
|
||||
ipsectest1 ansible_host=192.168.201.90
|
||||
ned-host1 ansible_host=192.168.88.248
|
||||
ned-host2 ansible_host=192.168.88.217
|
||||
ned-host3 ansible_host=192.168.88.230
|
||||
|
||||
[ansible-hosts]
|
||||
ned-host1
|
||||
|
||||
[pi]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
sdwcltm5
|
||||
sdwsrvm
|
||||
sdwcltm8
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwsrvl
|
||||
sdwcltm4
|
||||
#192.168.201.3
|
||||
ned-host1
|
||||
ned-host2
|
||||
ned-host3
|
||||
|
||||
[samba-server]
|
||||
ipsectest1
|
||||
ned-host1
|
||||
|
||||
[smbclient]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
ubuntu-server-1
|
||||
sdwcltm5
|
||||
sdwsrvm
|
||||
sdwcltm8
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwsrvl
|
||||
sdwcltm4
|
||||
sdwcltm9
|
||||
ned-host2
|
||||
ned-host3
|
||||
|
||||
[public]
|
||||
ubuntu-server-1
|
||||
|
||||
[snmpd]
|
||||
#192.168.201.3
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
sdwcltm6
|
||||
sdwcltm8
|
||||
|
||||
[netflows]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
sdwcltm5
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwcltm4
|
||||
sdwcltm8
|
||||
sdwcltm9
|
||||
sdwsrvm
|
||||
sdwsrvl
|
||||
ubuntu-server-1
|
||||
ubuntu-server-2
|
||||
|
||||
[facebook]
|
||||
sdwcltm5
|
||||
sdwsrvm
|
||||
sdwcltm4
|
||||
ned-host1
|
||||
|
||||
[salesforce]
|
||||
sdwcltm3
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwsrvl
|
||||
sdwcltm8
|
||||
ned-host2
|
||||
|
||||
[youtube]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
ned-host3
|
||||
|
||||
[ftpclient]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
sdwcltm4
|
||||
sdwcltm5
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwcltm8
|
||||
sdwsrvm
|
||||
ubuntu-server-1
|
||||
|
||||
[sipclient]
|
||||
sdwcltm2
|
||||
sdwcltm3
|
||||
sdwcltm4
|
||||
sdwcltm5
|
||||
sdwcltm6
|
||||
sdwcltm7
|
||||
sdwcltm8
|
||||
sdwcltm9
|
||||
sdwsrvl
|
||||
sdwsrvm
|
||||
ned-host2
|
||||
ned-host3
|
||||
|
||||
[sipserver]
|
||||
ubuntu-server-2
|
||||
ned-host1
|
||||
|
||||
0
inventory.cfg
Executable file → Normal file
0
inventory.cfg
Executable file → Normal file
10
main.yaml
10
main.yaml
@@ -16,15 +16,13 @@
|
||||
- smbclient
|
||||
- hosts: pi
|
||||
roles:
|
||||
- snmpd
|
||||
- wifi
|
||||
- vnc
|
||||
- domainname
|
||||
- pi
|
||||
vars_prompt:
|
||||
- name: rocommunity
|
||||
prompt: "Enter SNMP RO community name"
|
||||
default: "public"
|
||||
# vars_prompt:
|
||||
# - name: rocommunity
|
||||
# prompt: "Enter SNMP RO community name"
|
||||
# default: "public"
|
||||
- hosts: youtube
|
||||
roles:
|
||||
- youtube
|
||||
|
||||
10
password.yaml
Normal file
10
password.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: pi
|
||||
become: yes
|
||||
user:
|
||||
name: pi
|
||||
state: present
|
||||
update_password: always
|
||||
password: "$6$Vmob4l5KBg11gcNV$fY.hrffHEc9gpcFhVdEmW7tepxJURBmkgQhC7kC25VsxcfHAtlqEP6Cvm6nK4jtqndkaQ/I29h/MkKk8KsdSV1"
|
||||
0
playbook.yaml
Executable file → Normal file
0
playbook.yaml
Executable file → Normal file
6
reboot.yaml
Normal file
6
reboot.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- hosts: all,!ansible-hosts
|
||||
tasks:
|
||||
- name: reboot
|
||||
become: yes
|
||||
reboot:
|
||||
2
requirements.yml
Normal file
2
requirements.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
- name: mikolak-net.raspi_config
|
||||
|
||||
27
roles/common/tasks/main.yaml
Executable file → Normal file
27
roles/common/tasks/main.yaml
Executable file → Normal file
@@ -23,17 +23,10 @@
|
||||
content: "{{ lookup('template', '{{ role_path }}/templates/hosts.j2') }}"
|
||||
state: present
|
||||
tags: update_hosts
|
||||
- name: clean hosts file
|
||||
become: true
|
||||
blockinfile:
|
||||
path: /etc/hosts
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||
content: ""
|
||||
tags: clean_hosts
|
||||
- name: install programs and libraries
|
||||
become: true
|
||||
apt:
|
||||
name: [ 'expect', 'ftp', 'cadaver', 'iperf', 'iperf3', 'libpcap0.8', 'libsctp1', 'libsctp-dev', 'libncurses-dev', 'libssl-dev', 'libpcap-dev', 'vim', 'mc', 'smbclient', 'ncurses-dev', 'build-essential', 'openvpn' ]
|
||||
name: [ 'expect', 'ftp', 'cadaver', 'iperf', 'iperf3', 'libpcap0.8', 'libsctp1', 'libsctp-dev', 'libncurses-dev', 'libssl-dev', 'libpcap-dev', 'vim', 'mc', 'smbclient', 'ncurses-dev', 'build-essential', 'openvpn', 'lightdm', 'lxde', 'realvnc-vnc-server', 'aptitude', 'chromium-browser', 'raspberrypi-ui-mods' ]
|
||||
update_cache: true
|
||||
state: present
|
||||
tags: install_packages
|
||||
@@ -65,4 +58,22 @@
|
||||
state: restarted
|
||||
tags: enable_openvpn
|
||||
when: openvpn_enabled
|
||||
- lineinfile:
|
||||
path: /etc/sudoers
|
||||
state: present
|
||||
regexp: '^%sudo'
|
||||
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
|
||||
validate: 'visudo -cf %s'
|
||||
become: true
|
||||
tags: pi_sudo
|
||||
- name: Ensure the locale exists
|
||||
locale_gen:
|
||||
name: en_US.UTF-8
|
||||
state: present
|
||||
become: yes
|
||||
- name: set as default locale
|
||||
command: raspi-config nonint do_change_locale en_US.UTF-8
|
||||
become: yes
|
||||
- name: set keyboard to us
|
||||
command: raspi-config nonint do_configure_keyboard us
|
||||
|
||||
|
||||
0
roles/domainname/tasks/main.yaml
Executable file → Normal file
0
roles/domainname/tasks/main.yaml
Executable file → Normal file
0
roles/facebook/files/facebook.sh
Executable file → Normal file
0
roles/facebook/files/facebook.sh
Executable file → Normal file
0
roles/facebook/tasks/main.yaml
Executable file → Normal file
0
roles/facebook/tasks/main.yaml
Executable file → Normal file
0
roles/ftpclient/files/ftp-session.sh
Executable file → Normal file
0
roles/ftpclient/files/ftp-session.sh
Executable file → Normal file
0
roles/ftpclient/tasks/main.yaml
Executable file → Normal file
0
roles/ftpclient/tasks/main.yaml
Executable file → Normal file
0
roles/netflows/tasks/main.yaml
Executable file → Normal file
0
roles/netflows/tasks/main.yaml
Executable file → Normal file
0
roles/nrpe/files/check_mem.pl
Executable file → Normal file
0
roles/nrpe/files/check_mem.pl
Executable file → Normal file
0
roles/nrpe/tasks/main.yaml
Executable file → Normal file
0
roles/nrpe/tasks/main.yaml
Executable file → Normal file
10
roles/pi/tasks/main.yaml
Executable file → Normal file
10
roles/pi/tasks/main.yaml
Executable file → Normal file
@@ -14,4 +14,14 @@
|
||||
become: true
|
||||
command: '/etc/init.d/dphys-swapfile restart'
|
||||
tags: set_swapfile
|
||||
- lineinfile:
|
||||
path: /boot/config.txt
|
||||
state: present
|
||||
backrefs: yes
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
with_items:
|
||||
- { regexp: '#framebuffer_width=1280', line: 'framebuffer_width=1280' }
|
||||
- { regexp: '#framebuffer_height=720', line: 'framebuffer_height=1024' }
|
||||
become: true
|
||||
|
||||
|
||||
0
roles/public/tasks/main.yaml
Executable file → Normal file
0
roles/public/tasks/main.yaml
Executable file → Normal file
0
roles/salesforce/files/salesforce.sh
Executable file → Normal file
0
roles/salesforce/files/salesforce.sh
Executable file → Normal file
0
roles/salesforce/tasks/main.yaml
Executable file → Normal file
0
roles/salesforce/tasks/main.yaml
Executable file → Normal file
@@ -3,7 +3,7 @@ ubuntu_samba_packages:
|
||||
- samba
|
||||
- samba-common
|
||||
- python-glade2
|
||||
- system-config-samba
|
||||
# - system-config-samba
|
||||
workgroup: DEMO
|
||||
public_share_name: share
|
||||
public_share_path: /media/share
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
- name: Restart Samba
|
||||
service:
|
||||
systemd:
|
||||
name: smbd.service
|
||||
state: restarted
|
||||
enabled: yes
|
||||
- name: Generate Samba Files
|
||||
become: yes
|
||||
shell: /home/pi/scripts/genfiles.sh
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
src: etc_samba_smb.conf.j2
|
||||
dest: /etc/samba/smb.conf
|
||||
backup: yes
|
||||
notify:
|
||||
- Restart Samba
|
||||
# notify: Restart Samba
|
||||
|
||||
- name: Create Samba users restricted group
|
||||
group:
|
||||
@@ -70,5 +69,4 @@
|
||||
group: pi
|
||||
mode: a+x
|
||||
tags: samba_genfiles
|
||||
notify:
|
||||
- Generate Samba Files
|
||||
notify: Generate Samba Files
|
||||
|
||||
0
roles/sipclient/tasks/main.yaml
Executable file → Normal file
0
roles/sipclient/tasks/main.yaml
Executable file → Normal file
0
roles/sipp/files/startclient.sh
Executable file → Normal file
0
roles/sipp/files/startclient.sh
Executable file → Normal file
0
roles/sipp/files/startserver.sh
Executable file → Normal file
0
roles/sipp/files/startserver.sh
Executable file → Normal file
0
roles/sipp/tasks/main.yaml
Executable file → Normal file
0
roles/sipp/tasks/main.yaml
Executable file → Normal file
0
roles/sipserver/tasks/main.yaml
Executable file → Normal file
0
roles/sipserver/tasks/main.yaml
Executable file → Normal file
2
roles/smbclient/files/smb-session.sh
Executable file → Normal file
2
roles/smbclient/files/smb-session.sh
Executable file → Normal file
@@ -13,6 +13,6 @@ if pgrep -f test_file >/dev/null
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
smbclient //192.168.198.2/share -c "get $file" -A ~/.credentials
|
||||
smbclient //192.168.88.230/share -c "get $file" -A ~/.credentials
|
||||
fi
|
||||
|
||||
|
||||
0
roles/smbclient/tasks/main.yaml
Executable file → Normal file
0
roles/smbclient/tasks/main.yaml
Executable file → Normal file
0
roles/snmpd/tasks/main.yaml
Executable file → Normal file
0
roles/snmpd/tasks/main.yaml
Executable file → Normal file
6
roles/vnc/tasks/main.yaml
Executable file → Normal file
6
roles/vnc/tasks/main.yaml
Executable file → Normal file
@@ -15,3 +15,9 @@
|
||||
owner: root
|
||||
group: root
|
||||
tags: vnc_config
|
||||
- name: set lxde in .xsession
|
||||
lineinfile:
|
||||
path: /home/pi/.xsession
|
||||
line: lxsession -s Lubuntu -e LXDE
|
||||
create: yes
|
||||
|
||||
|
||||
0
roles/webclient/files/cadaver-webdav-clean.sh
Executable file → Normal file
0
roles/webclient/files/cadaver-webdav-clean.sh
Executable file → Normal file
0
roles/webclient/files/cadaver-webdav.sh
Executable file → Normal file
0
roles/webclient/files/cadaver-webdav.sh
Executable file → Normal file
0
roles/webclient/files/webdav-session.sh
Executable file → Normal file
0
roles/webclient/files/webdav-session.sh
Executable file → Normal file
0
roles/wifi/tasks/main.yaml
Executable file → Normal file
0
roles/wifi/tasks/main.yaml
Executable file → Normal file
0
roles/youtube/files/youtube.sh
Executable file → Normal file
0
roles/youtube/files/youtube.sh
Executable file → Normal file
0
roles/youtube/tasks/main.yaml
Executable file → Normal file
0
roles/youtube/tasks/main.yaml
Executable file → Normal file
0
set_sudoer.yml
Executable file → Normal file
0
set_sudoer.yml
Executable file → Normal file
Reference in New Issue
Block a user