Added selinux role to download and install libselinux-python to fix selinux error

pull/63/head
usurusr 11 years ago
parent c96fba7c3e
commit 3fc30111fd
  1. 9
      tomcat-standalone/roles/selinux/tasks/main.yml
  2. 6
      tomcat-standalone/roles/tomcat/tasks/main.yml
  3. 1
      tomcat-standalone/site.yml

@ -0,0 +1,9 @@
---
- name: Download EPEL Repo
get_url: url=http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm dest=/tmp/epel-release-6-8.noarch.rpm
- name: Install EPEL Repo
command: rpm -ivh /tmp/epel-release-6-8.noarch.rpm creates=/etc/yum.repos.d/epel.repo
- name: Install libselinux-python
yum: name=libselinux-python

@ -3,13 +3,13 @@
yum: name=java-1.7.0-openjdk state=present
- name: Download Tomcat
get_url: url=http://mirror.symnds.com/software/Apache/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz dest=/opt/apache-tomcat-7.0.42.tar.gz
get_url: url=http://mirror.symnds.com/software/Apache/tomcat/tomcat-7/v7.0.47/bin/apache-tomcat-7.0.47.tar.gz dest=/opt/apache-tomcat-7.0.47.tar.gz
- name: Extract archive
command: chdir=/usr/share /bin/tar xvf /opt/apache-tomcat-7.0.42.tar.gz -C /usr/share/ creates=/usr/share/tomcat
command: chdir=/usr/share /bin/tar xvf /opt/apache-tomcat-7.0.47.tar.gz -C /usr/share/ creates=/usr/share/tomcat
- name: Symlink install directory
file: src=/usr/share/apache-tomcat-7.0.42 path=/usr/share/tomcat state=link
file: src=/usr/share/apache-tomcat-7.0.47 path=/usr/share/tomcat state=link
- name: Add group "tomcat"
group: name=tomcat

@ -5,4 +5,5 @@
user: root
roles:
- selinux
- tomcat