-update swap file size for pi's - use dphys-swapfile
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
- wifi
|
||||
- vnc
|
||||
- domainname
|
||||
- pi
|
||||
vars_prompt:
|
||||
- name: rocommunity
|
||||
prompt: "Enter SNMP RO community name"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
- name: enable cron job for ftp traffic
|
||||
cron:
|
||||
name: "ftptraff"
|
||||
minute: "*/60"
|
||||
hour: "7-18"
|
||||
minute: "0"
|
||||
hour: "7-18/2"
|
||||
weekday: "1-5"
|
||||
job: "/usr/bin/perl -e 'sleep int rand 3599' && /home/pi/scripts/ftp-session.sh"
|
||||
job: "/usr/bin/perl -e 'sleep int rand 7199' && /home/pi/scripts/ftp-session.sh"
|
||||
tags: ftptraff_cron
|
||||
- name: copy ftp-session.sh to scripts directory
|
||||
copy:
|
||||
|
||||
17
roles/pi/tasks/main.yaml
Executable file
17
roles/pi/tasks/main.yaml
Executable file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: set swapfile
|
||||
become: true
|
||||
lineinfile:
|
||||
path: /etc/dphys-swapfile
|
||||
state: present
|
||||
regexp: '^CONF_SWAPSIZE'
|
||||
line: 'CONF_SWAPSIZE=1024'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
tags: set_swapfile
|
||||
- name: restart swapfile
|
||||
become: true
|
||||
command: '/etc/init.d/dphys-swapfile restart'
|
||||
tags: set_swapfile
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#/bin/bash
|
||||
#!/bin/bash
|
||||
echo "q" >/dev/udp/127.0.0.1/8888
|
||||
|
||||
Reference in New Issue
Block a user