-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildtools.yml
95 lines (79 loc) · 2.45 KB
/
buildtools.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
- name: Dev Setup
hosts: localhost
vars:
folders:
- terraform
- packer
- .terraform.d/plugins
keys:
- https://bazel.build/bazel-release.pub.gpg
- https://pkg.jenkins.io/debian/jenkins.io.key
- https://apt.releases.hashicorp.com/gpg
- https://apt.releases.hashicorp.com/gpg
repos:
- deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8
- deb https://pkg.jenkins.io/debian binary/
- deb [arch=amd64] https://apt.releases.hashicorp.com {{ docker_version.stdout }} main
- deb [arch=amd64] https://apt.releases.hashicorp.com {{ docker_version.stdout }} main
packages:
- bazel
- default-jdk
- terraform
- packer
downloads:
urls:
- https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
- https://github.com/nbering/terraform-provider-ansible/releases/download/v1.0.4/terraform-provider-ansible_1.0.4_linux_amd64.zip
sudo_files:
- aws/install
move_files:
- terraform-provider-ansible_v1.0.4 terraform-provider-ansible
- terraform-provider-ansible .terraform.d/plugins/
tasks:
- name: make folders
file:
path: './{{ item }}'
mode: 0755
state: directory
with_items: '{{ folders }}'
- name: add keys
apt_key:
state: present
url: '{{ item }}'
with_items: '{{ keys }}'
become: yes
- name: save docker version to variable
shell: lsb_release -cs
register: docker_version
- name: add repositories
apt_repository:
repo: '{{ item }}'
state: present
with_items: '{{ repos }}'
become: yes
- name: install packages
apt:
name: '{{ packages }}'
state: latest
update_cache: yes
become: yes
- name: download and unzip files
unarchive:
src: '{{ item }}'
dest: .
copy: no
with_items: '{{ downloads.urls }}'
- name: run as root downloads
command: './{{ item }}'
with_items: '{{ downloads.sudo_files }}'
become: yes
ignore_errors: yes
- name: move files
command: 'mv {{ item }}'
with_items: '{{ downloads.move_files }}'
- name: cleanup files
file:
path: './{{ item }}'
state: absent
with_items: '{{ downloads.sudo_files }}'