mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Have selinux allow docker<=>nginx communication
This commit is contained in:
parent
9dd5f8c758
commit
98db6a232d
2 changed files with 18 additions and 1 deletions
|
@ -72,5 +72,8 @@
|
|||
that:
|
||||
- "'hello world' in docker_output.stdout_lines"
|
||||
|
||||
- name: Remove the busybox image from the local docker
|
||||
- name: Remove containers
|
||||
shell: "docker rm $(docker ps -aq)"
|
||||
|
||||
- name: Remove all images from the local docker
|
||||
shell: "docker rmi -f $(docker images -q)"
|
||||
|
|
|
@ -90,6 +90,20 @@
|
|||
that:
|
||||
- "{{ docker_output.stdout_lines| length }} <= 1"
|
||||
|
||||
#
|
||||
# Private registry secured with an SSL proxy
|
||||
#
|
||||
|
||||
- name: Set selinux to allow docker to connect to nginx
|
||||
seboolean:
|
||||
name: docker_connect_any
|
||||
state: yes
|
||||
|
||||
- name: Set selinux to allow nginx to connect to docker
|
||||
seboolean:
|
||||
name: httpd_can_network_connect
|
||||
state: yes
|
||||
|
||||
- name: Setup nginx with a user/password
|
||||
copy:
|
||||
src: docker-registry.htpasswd
|
||||
|
|
Loading…
Reference in a new issue