-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
76 lines (58 loc) · 1.8 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
- hosts: builder
become: yes
become_method: sudo
vars_files:
- vars.yml
tasks:
- name: Install system dependencies
pacman: name={{ item }} state=present
with_items:
- python-yaml
- devtools
- arch-install-scripts
- git
- ostree
- name: Install nginx
pacman: name=nginx state=present
notify:
- enable nginx
- restart nginx
- name: Install cronie
pacman: name=cronie state=present
notify:
- enable cronie
- restart cronie
- name: Set up the nginx server
template:
src: templates/nginx.conf.j2
dest: "{{ nginx_conf_path }}/nginx.conf"
mode: 0644
notify: reload nginx
- name: Install arch-ostree
git: repo=https://github.com/iBeliever/arch-ostree.git
dest={{ arch_ostree_dir }}
- name: Ensure the build directory exists
file: dest={{ builder_dir }} state=directory
- name: Ensure the builder data exists
file: dest={{ builder_dir }} state=directory mode=a+rw
- name: Install the OSTree build job
template: src=templates/build_ostree.sh.j2
dest={{ builder_dir }}/build_ostree.sh
mode=a+x
- name: Upload the GNOME OS config
copy: src=files/gnome.yml
dest={{ builder_dir }}/gnome.yml
- name: Set up the daily OSTree build job
cron: name="a job for reboot" special_time=daily job="{{ builder_dir }}/build_ostree.sh"
handlers:
- name: enable nginx
service: name=nginx enabled=yes
- name: restart nginx
service: name=nginx state=restarted
- name: enable cronie
service: name=cronie enabled=yes
- name: restart cronie
service: name=cronie state=restarted
- name: reload nginx
service: name=nginx state=reloaded