-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
66 lines (66 loc) · 2.07 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: all
become: yes
become_user: root
tasks:
- name: upgrade all packages
dnf: name="*" state=latest
- name: Have git, wget, ag, dnf-plugins-core, gpg, haveged, Java 1.8
dnf: name={{item}} state=latest
with_items:
- git
- wget
- the_silver_searcher
- dnf-plugins-core
- gnupg
# run sudo haveged --run=0 to fill entropy pool for key generation
- haveged
- java-1.8.0-openjdk-devel
- libselinux-python
- name: Have Maven 3.5
unarchive:
src: http://mirror.netcologne.de/apache.org/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
dest: /home/vagrant
remote_src: True
creates: /home/vagrant/apache-maven-3.5.0
- name: Have Java 9
get_url:
url: http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
dest: /home/vagrant/jdk-9.0.4_linux-x64_bin.tar.gz
headers: "Cookie:oraclelicense=accept-securebackup-cookie"
- name: Have Java 9 unpacked
unarchive:
src: /home/vagrant/jdk-9.0.4_linux-x64_bin.tar.gz
dest: /home/vagrant
creates: /home/vagrant/jdk-9.0.4
- name: Have Maven as alternative
alternatives:
name: mvn
link: /usr/bin/mvn
path: /home/vagrant/apache-maven-3.5.0/bin/mvn
- name: Have java 9 as alternative
alternatives:
name: java
link: /usr/bin/java
path: /home/vagrant/jdk-9.0.4/bin/java
- name: Have javac 9 as alternative
alternatives:
name: javac
link: /usr/bin/javac
path: /home/vagrant/jdk-9.0.4/bin/javac
- name: Have docker repo
shell: 'dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo'
- name: Have dnf cache updated
shell: 'dnf makecache'
- name: Have docker-ce
dnf: name=docker-ce
- name: add docker group
group: name=docker state=present
- name: add user to docker group
user: name=vagrant groups=docker state=present
- name: Ensure Docker is started
systemd:
state: started
name: docker