-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathprepare.yml
47 lines (44 loc) · 1.3 KB
/
prepare.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
38
39
40
41
42
43
44
45
46
47
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.cron
post_tasks:
- name: Create log directory
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: "0755"
loop:
- /var/log/example
- /var/log/example-frequency
- /var/log/example-keep
- /var/log/example-compress
- /var/log/example-copylog
- /var/log/example-copytruncate
- /var/log/example-delaycompress
- /var/log/example-script
- /var/log/example-sharedscripts
- /var/log/example-dateyesterday
- name: Create log file
ansible.builtin.copy:
dest: "{{ item }}"
content: "example"
mode: "0644"
loop:
- /var/log/example/app.log
- /var/log/example-frequency/app.log
- /var/log/example-keep/app.log
- /var/log/example-compress/app.log
- /var/log/example-copylog/app.log
- /var/log/example-copytruncate/app.log
- /var/log/example-delaycompress/app.log
- /var/log/example-script/app.log
- /var/log/example-sharedscripts/app.log
- /var/log/example-dateyesterday/app.log
- /var/log/btmp
- /var/log/wtmp
- /var/log/hawkey.log