-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsite.yml
40 lines (40 loc) · 1.06 KB
/
site.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
---
- name: Install jenkins, nginx and squid3.
hosts: vagrant
pre_tasks:
- name: Update apt cache
apt:
update_cache: true
cache_valid_time: 600
roles:
- common
- sudoers
- java
- nginx
- grafana
- squid3
- postfix
- jenkins
post_tasks:
- name: Create facts directory
file:
path: /etc/ansible/facts.d
state: directory
- name: Create provision fact
copy:
dest: /etc/ansible/facts.d/provison.fact
content: |
[gitinfo]
revision={{gitinfo.revision}}
branch={{gitinfo.branch}}
status={{gitinfo.status}}
user={{gitinfo.user}}
[time]
lastrun={{ansible_date_time.iso8601}}
changed_when: false
- name: Update motd
lineinfile:
dest: /etc/motd
regexp: '^MANAGED BY ANSIBLE .*$'
line: 'MANAGED BY ANSIBLE rev={{gitinfo.revision}}, branch={{gitinfo.branch}}, status={{gitinfo.status}}, user={{gitinfo.user}}, lastrun={{ansible_date_time.iso8601}}'
changed_when: false