-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.yml
41 lines (34 loc) · 936 Bytes
/
common.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
---
- hosts: all
become: yes
pre_tasks:
- name: run pre tasks on ubuntu
block:
- name: disable IPV6 for apt-get
copy:
src: 99force-ipv4.txt
dest: /etc/apt/apt.conf.d/99force-ipv4
- name: update apt cache
apt:
update_cache: yes
- name: Install MySQl-Python
apt:
name: python-mysqldb
state: present
when: ansible_distribution == 'Ubuntu'
- name: run pre tasks on centos
block:
- name: update yum
yum:
name: '*'
update_cache: yes
state: latest
- name: Install common packages for CentOS
yum:
name: "{{ item }}"
state: present
with_items:
- libselinux-python
- MySQL-python
- yum-utils
when: ansible_distribution == 'CentOS'