Commit 56d30d24 authored by Paschalis Korosoglou's avatar Paschalis Korosoglou
Browse files

Start working around different distros.

parent c27d9d2c
---
- name: copy iptables file onto host
template: src=iptables.j2
dest=/etc/sysconfig/iptables backup=no
owner=root group=root mode=0600
when: iptables_rules is defined
notify: reload iptables
- name: copy ip6tables file onto host
template: src=ip6tables.j2
dest=/etc/sysconfig/ip6tables backup=no
owner=root group=root mode=0600
when: ip6tables_rules is defined
notify: reload ip6tables
---
- name: Enable required ports
firewalld: service={{ item }} immediate=true permanent=true state=enabled
with_items: services
when: services is defined
--- ---
- name: copy iptables file onto host - include: centos6.yml
template: src=iptables.j2 when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
dest=/etc/sysconfig/iptables backup=no
owner=root group=root mode=0600 - include: centos7.yml
when: iptables_rules is defined when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
notify: reload iptables
- name: copy ip6tables file onto host
template: src=ip6tables.j2
dest=/etc/sysconfig/ip6tables backup=no
owner=root group=root mode=0600
when: ip6tables_rules is defined
notify: reload ip6tables
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
- name: Install epel repo files - name: Install epel repo files
yum: name={{ epel_release_url }}{{ epel_release_name }} yum: name={{ epel_release_url }}{{ epel_release_name }}
state=present state=present
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webapi when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
- name: Install arstats repo files - name: Install arstats repo files
yum: name={{ arstats_release_url }}{{ arstats_release_name }} yum: name={{ arstats_release_url }}{{ arstats_release_name }}
state=present state=present
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webapi when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
- name: Install mongodb repo - name: Install mongodb repo
tags: mongodb_repo tags: mongodb_repo
......
--- ---
iptables_rules: services:
input: - http
- { dport: "80", proto: "tcp", policy: "accept"} - https
- { dport: "443", proto: "tcp", policy: "accept"}
lavoisier_home: /var/www/lavoisier lavoisier_home: /var/www/lavoisier
download_url: https://github.com/ARGOeu/argo-egi-web/archive/master.zip download_url: https://github.com/ARGOeu/argo-egi-web/archive/master.zip
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment