-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
66 lines (56 loc) · 1.69 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
---
- hosts: localhost
connection: local
pre_tasks:
- include_vars: group_vars/secure.yml
ignore_errors: true
- name: Add the docker role
become: yes
group:
name: docker
state: present
- name: Add the vagrant user to the docker role
become: yes
user:
append: yes
groups: docker
name: vagrant
register: docker_group
- name: Is docker already installed
become: yes
stat: path=/usr/bin/docker
register: docker
- name: Is zsh already installed
become: yes
stat: path=/bin/zsh
register: zsh
- name: Is google chrome already installed
become: yes
stat: path=/usr/bin/google-chrome
register: chrome
- name: Is atom already installed
become: yes
stat: path=/usr/bin/atom
register: atom
roles:
- { role: nexeck.docker, become: yes, when: docker.stat.exists == False }
- { role: rallen-temp.ansible-zsh, when: zsh.stat.exists == False }
- { role: vcabourdin.chrome, become: yes, when: chrome.stat.exists == False }
- { role: ansibl3.deb_atom, become: yes, when: atom.stat.exists == False }
- { role: syncthing, become: yes }
post_tasks:
- name: Change default shell to zsh
become: yes
command: chsh -s /usr/bin/zsh vagrant
- name: Install additional software packages
become: yes
apt:
name: "{{ item }}"
state: "latest"
update_cache: yes
with_items: "{{ additional_software }}"
ignore_errors: yes
- name: Reboot
become: yes
command: reboot now
when: docker_group.changed