Fix selinux config in sysconfig

This commit is contained in:
Emilien Macchi 2018-04-14 18:14:33 -07:00
parent 889374d613
commit b29e6b2f43
1 changed files with 11 additions and 1 deletions

View File

@ -30,13 +30,23 @@
create: yes
notify: restart docker service
- name: configure OPTIONS and enable selinux in /etc/sysconfig/docker
lineinfile:
path: /etc/sysconfig/docker
regexp: '^OPTIONS='
line: "OPTIONS='--selinux-enabled {{ docker_options }}'"
create: yes
notify: restart docker service
when: selinux_enabled|bool
- name: configure OPTIONS in /etc/sysconfig/docker
lineinfile:
path: /etc/sysconfig/docker
regexp: '^OPTIONS='
line: "OPTIONS='--iptables={{ selinux_enabled|bool }} {{ docker_options }}'"
line: "OPTIONS='{{ docker_options }}'"
create: yes
notify: restart docker service
when: not selinux_enabled|bool
- name: configure INSECURE_REGISTRY in /etc/sysconfig/docker
lineinfile: