-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebapp.yml
36 lines (31 loc) · 885 Bytes
/
webapp.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
---
- name: "Apache installation using docker"
hosts: prod
become: true
roles:
- webapp
vars_files:
- files/secrets/credentials.vault
pre_tasks:
# - name: Add ansible SSH public key to remote host <authorized_key> file
# authorized_key:
# user: admin
# state: present
# key: "{{ lookup('file', '{{ public_key_path }}/{{ public_key_file_name }}') }}"
- name: Install EPEL repo, git, wget
yum:
name: "{{ item }}"
state: present
loop:
- epel-release
- wget
- git
when: ansible_distribution == "CentOS"
- name: download pip script
get_url:
url: https://bootstrap.pypa.io/pip/2.7/get-pip.py
dest: /tmp/get-pip.py
- name: install python-pip
command: python2.7 /tmp/get-pip.py
- name: Install docker python
pip: name=docker-py