forked from vkill/ansible-role-incron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vagrant_playbook.yml
37 lines (33 loc) · 892 Bytes
/
vagrant_playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
- name: Test ansible-role-incron
hosts: all
become: true
pre_tasks:
- name: Touch script.sh for user
file:
path: /tmp/incron_demo.sh
state: touch
mode: "u=rwx,g=rx,o=rx"
- name: Fill content to script.sh for demo
lineinfile:
dest: /tmp/incron_demo.sh
line: "echo user $1 $2 >> /tmp/incron_demo_system_table.log"
roles:
- role: ../ansible-role-incron
incron_install_from_source: true
incron_install_from_source_force_update: true
incron_system_tables:
- name: demo
path: /home/
mask: IN_CREATE,IN_DELETE
command: /tmp/incron_demo.sh $# $%
post_tasks:
- name: Create user for demo
user:
name: incron_demo
append: yes
- name: Remove user for demo
user:
name: incron_demo
state: absent
remove: yes