add periodic screenshots to call machines
This commit is contained in:
parent
f18267c29b
commit
95759ca363
3 changed files with 29 additions and 1 deletions
6
screenshot.service
Normal file
6
screenshot.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Take a screenshot
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/scrot %h/screenshots/%Y-%m-%d_%H-%M-%S.jpg
|
10
screenshot.timer
Normal file
10
screenshot.timer
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Take a screenshot every minute
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=1min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -33,7 +33,7 @@
|
|||
global: yes
|
||||
state: present
|
||||
|
||||
- name: Update apt cache and install Git, unclutter
|
||||
- name: Update apt cache and install Git, unclutter, scrot
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
|
@ -41,6 +41,15 @@
|
|||
loop:
|
||||
- git
|
||||
- unclutter
|
||||
- scrot
|
||||
|
||||
- name: Make sure ~/screenshots exists
|
||||
file:
|
||||
name: "/home/{{ ansible_user }}/screenshots"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Clone Git repository
|
||||
become: yes
|
||||
|
@ -66,6 +75,8 @@
|
|||
- parsifal.service
|
||||
- unclutter.service
|
||||
# - x11vnc.service
|
||||
- screenshot.service
|
||||
- screenshot.timer
|
||||
|
||||
- name: Reload systemd user service
|
||||
become: yes
|
||||
|
@ -86,3 +97,4 @@
|
|||
- parsifal
|
||||
- unclutter
|
||||
# - x11vnc
|
||||
- screenshot.timer
|
||||
|
|
Loading…
Reference in a new issue