forked from patrick-motard/dot-ansible
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vagrant.yml
49 lines (43 loc) · 1.25 KB
/
vagrant.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
---
- hosts: all
vars:
- local_user: "vagrant"
# git name and email are used to sign your commits in git.
- git_name: "Patrick Motard"
- git_email: "[email protected]"
roles:
- zsh
tasks:
- name: Set git username and email
shell: |
git config --global user.email "{{git_email}}"
git config --global user.name "{{git_name}}"
- name: Update pacman packages and cache.
become: true
pacman:
update_cache: yes
upgrade: yes
- name: Docker
become: true
block:
- name: Install Docker
pacman:
name: "docker"
state: present
- name: Create docker usergroup
group:
name: docker
state: present
- name: Add user to docker group
# so that we don't have to type sudo every time we use docker
user:
name: "{{local_user}}"
groups: docker
append: yes
- name: Start/Enable docker service
systemd:
name: docker
# if this step fails in vagrant,
# run 'sudo reboot' before running 'vagrant provision' or 'vagrant up' again
# state: started
enabled: yes