-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.yml
42 lines (42 loc) · 1.44 KB
/
setup.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
---
- hosts: localhost
tasks:
- name: valid git version
yum: name=git state=latest
become: yes
become_method: sudo
- name: clone petclinic
git: repo=https://github.com/Ahmad-Mahagna/spring-petclinic.git dest=~/petclinic
- name: clone trepo
git: repo=https://github.com/Ahmad-Mahagna/trepo.git dest=~/trepo update=no
- name: install docker
yum: name=docker state=latest
become: yes
become_method: sudo
- name: update user ec2-user with docker group permission
user: name=ec2-user group=docker append=yes
become: yes
become_method: sudo
- name: start docker daemon
service: name=docker state=started
become: yes
become_method: sudo
- name: install maven
unarchive: src=http://apache.mivzakim.net/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz copy=no dest=~ creates=~/apache-maven-3.3.9
- name: Ensure Jenkins Yum repo present
become: yes
become_method: sudo
get_url: url=http://pkg.jenkins-ci.org/redhat/jenkins.repo
dest=/etc/yum.repos.d/jenkins.repo mode=0644
- name: Ensure Jenkins GPG key installed
command: rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
become: yes
become_method: sudo
- name: Ensure Jenkins installed
yum: name=jenkins state=present
become: yes
become_method: sudo
- name: Ensure Jenkins is running
service: name=jenkins state=running enabled=true
become: yes
become_method: sudo