summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-08-14 16:34:42 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-08-14 16:34:42 -0400
commitc7337a81964057cea17d5e88c455d343f3e138d4 (patch)
treeb41b75a435b3c29a2818e70bf47d4c2aea083a29 /roles
parent420ce5b14287f942fbcaa67f54b0a1cc6b11c18f (diff)
parentdb0078cd9631d841bef5c176aed18a7907871d1d (diff)
downloadopenshift-c7337a81964057cea17d5e88c455d343f3e138d4.tar.gz
openshift-c7337a81964057cea17d5e88c455d343f3e138d4.tar.bz2
openshift-c7337a81964057cea17d5e88c455d343f3e138d4.tar.xz
openshift-c7337a81964057cea17d5e88c455d343f3e138d4.zip
Merge pull request #358 from lhuard1A/selinux-disabled
Make the playbooks friendlier with SELinux disabled hosts
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node/tasks/main.yml7
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 3225645a2..adffca252 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -6,6 +6,9 @@
- fail:
msg: This role requres that osn_cluster_dns_ip is set
when: osn_cluster_dns_ip is not defined or not osn_cluster_dns_ip
+- fail:
+ msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
+ when: (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online']
- name: Install OpenShift Node package
yum: pkg=openshift-node state=present
@@ -64,11 +67,13 @@
lineinfile:
dest: /etc/sysconfig/docker
regexp: '^OPTIONS=.*'
- line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} --selinux-enabled'"
+ line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} \
+{% if ansible_selinux and ansible_selinux.status == '''enabled''' %}--selinux-enabled{% endif %}'"
when: docker_check.stat.isreg
- name: Allow NFS access for VMs
seboolean: name=virt_use_nfs state=yes persistent=yes
+ when: ansible_selinux and ansible_selinux.status == "enabled"
- name: Start and enable openshift-node
service: name=openshift-node enabled=yes state=started