This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.yml
81 lines (65 loc) · 2.34 KB
/
main.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
77
78
79
80
81
---
# These steps ("Update Yarn apt key" and "Remove Duplicity PPA repo") were added to fix issues with
# updating the apt cache on older boxes. Once the older versions (1.4.0 and below) are no longer supported,
# these first two steps can be removed.
- name: Common | Update Yarn apt key
become: true
command: apt-key adv --keyserver keys.gnupg.net --recv-keys 72ECF46A56B4AD39C907BBB71646B01B86E50310
- name: Common | Remove Duplicity PPA repo
become: true
apt_repository:
repo: ppa:duplicity-team
state: absent
tags: common
- name: Common | Update apt cache
become: true
apt: update-cache=yes
tags: common
- name: Common | Install System Packages
become: true
apt: pkg={{ item }} state=present
with_items: "{{ system_packages }}"
tags: common
- name: Common | Configure PALANTIR_ENVIRONMENT variable
lineinfile: dest=/home/vagrant/.profile state=present line='export PALANTIR_ENVIRONMENT="vagrant"'
tags: common
- name: Common | Copy user's gitconfig from host
copy: src=~/.gitconfig dest=/home/vagrant/.gitconfig
tags: common
- name: Common | Get user.name from host's gitconfig
git_config:
name: user.name
scope: global
register: git_author_name
tags: common
- name: Common | Get user.email from host's gitconfig
git_config:
name: user.email
scope: global
register: git_author_email
tags: common
- name: Common | Copy gitconfig from template
template:
src: gitconfig
dest: /home/vagrant/.gitconfig
- name: Common | Copy gitignore
copy: src=roles/common/templates/gitignore dest=/home/vagrant/.gitignore
tags: common
- name: Common | Configure global gitignore
command: /usr/bin/git config --global core.excludesfile ~/.gitignore
tags: common
- name: Common | Ensure ~/bin exists
file:
path: /home/vagrant/bin
state: directory
owner: vagrant
mode: '755'
- name: Common | Add the ~/bin to the path
lineinfile: dest=/home/vagrant/.profile state=present line='export PATH="$PATH:$HOME/bin"'
tags: common
- name: Common | Add the project's vendor/bin to the path
lineinfile: dest=/home/vagrant/.profile state=present line='export PATH="$PATH:/var/www/{{ hostname }}/vendor/bin"'
tags: common
- name: Common | Change directory into the project root on login
lineinfile: dest=/home/vagrant/.profile state=present line='cd /var/www/{{ hostname }}'
tags: common