-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliaservers_with_yum_support.yml
90 lines (74 loc) · 2.72 KB
/
liaservers_with_yum_support.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
---
- hosts: liaservers
tasks:
- name: Fix DPKG state when using APT (just in case)
command: sudo dpkg --configure -a
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
sudo: yes
- name: Ensure apt is updated
tags: update
command: apt-get update
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
sudo: yes
- name: Ensure yum is updated
tags: update
command: yum update
when: "'{{ ansible_pkg_mgr }}' == 'yum'"
sudo: yes
- name: Add EPEL to yum
tags: update
action: "{{ ansible_pkg_mgr }} name=epel-release state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'yum'"
- name: Update certificates (needed for Debian)
tags: update
action: "{{ ansible_pkg_mgr }} name=ca-certificates state=latest"
- name: Ensure python-apt is installed
command: >
apt-get install python-apt -y -q
creates=/usr/share/doc/python-apt
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
sudo: yes
- name: Install Python
action: "{{ ansible_pkg_mgr }} name=python state=latest"
- name: Install VIM
tags: vim
action: "{{ ansible_pkg_mgr }} name=wget state=latest"
- name: Install GIT
tags: git
action: "{{ ansible_pkg_mgr }} name=git state=latest"
- name: Install GCC
tags: gcc
action: "{{ ansible_pkg_mgr }} name=gcc state=latest"
- name: Install python-virtualenv
action: "{{ ansible_pkg_mgr }} name=python-virtualenv state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
- name: Install python-virtualenv the hard CentOS way
command: "{{item}} creates=/usr/bin/virtualenv"
with_items:
- yum install python-setuptools -y
- easy_install pip
- pip install virtualenv
when: "'{{ ansible_pkg_mgr }}' == 'yum'"
sudo: yes
- name: Install python-dev (apt)
action: "{{ ansible_pkg_mgr }} name=python-dev state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
- name: Install python-devel (yum)
action: "{{ ansible_pkg_mgr }} name=python-devel state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'yum'"
- name: Install Docker (apt)
tags: docker
action: "{{ ansible_pkg_mgr }} name=docker state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'apt'"
- name: Install Docker (yum)
tags: docker
action: "{{ ansible_pkg_mgr }} name=docker-io state=latest"
when: "'{{ ansible_pkg_mgr }}' == 'yum'"
- name: Download Flocker
tags: flocker
command: "{{item}} creates=/home/ansible/flocker-tutorial/bin/flocker-deploy"
with_items:
- wget https://docs.clusterhq.com/en/0.3.2/_downloads/linux-install.sh
- chmod +x linux-install.sh
- ./linux-install.sh
sudo: yes