---
# tasks file for .
- name: Add apt-key (debian)
  apt_key: state=present keyserver=keys.gnupg.net id=1C4CBDCDCD2EFD2A
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Add PXC repository (debian)
  copy: src=./percona.list dest=/etc/apt/sources.list.d/percona.list
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Install PXC repository (debian)
  apt: state=present name=percona-xtradb-cluster-full-55
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Install dependencies of PXC (redhat)
  yum: state=present name='{{ item }}'
  with_items:
  - 'epel-release'
  - 'nc'
  - 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm'
  sudo: yes
  when: ansible_os_family == "Redhat"
- name: Install PXC repository (redhat)
  yum: state=present name='Percona-XtraDB-Cluster-55'
  sudo: yes
  when: ansible_os_family == "Redhat"

---
# tasks file for .
- name: Add apt-key (debian)
  apt_key: state=present keyserver=keys.gnupg.net id=1C4CBDCDCD2EFD2A
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Add PXC repository (debian)
  copy: src=./percona.list dest=/etc/apt/sources.list.d/percona.list
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Install PXC repository (debian)
  apt: state=present name=percona-xtradb-cluster-full-55
  sudo: yes
  when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu"
- name: Install dependencies of PXC (redhat)
  yum: state=present name='{{ item }}'
  with_items:
  - 'epel-release'
  - 'nc'
  - 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm'
  sudo: yes
  when: ansible_os_family == "RedHat"
- name: Install PXC repository (redhat)
  yum: state=present name='Percona-XtraDB-Cluster-55'
  sudo: yes
  when: ansible_os_family == "RedHat"

Modify to run in redhat (fix contition for redhat,centos)
Modify to run in redhat (fix contition for redhat,centos)
