mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Move 19 roles into roles/0-DEPRECATED-ROLES
This commit is contained in:
parent
0e39c42bbd
commit
2218d2334b
124 changed files with 5 additions and 1 deletions
2
roles/0-DEPRECATED-ROLES/docker/defaults/main.yml
Normal file
2
roles/0-DEPRECATED-ROLES/docker/defaults/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
docker_install: True
|
||||
docker_enabled: False
|
||||
55
roles/0-DEPRECATED-ROLES/docker/tasks/main.yml
Normal file
55
roles/0-DEPRECATED-ROLES/docker/tasks/main.yml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
- name: Install docker
|
||||
package: name={{ item }}
|
||||
state=present
|
||||
with_items:
|
||||
- docker
|
||||
- python-docker-py
|
||||
when: docker_install | bool
|
||||
#tags: download
|
||||
|
||||
- name: put the systemd startup file in place
|
||||
template: src=docker.service
|
||||
dest=/etc/systemd/system/
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: create the socket for docker
|
||||
template: src=docker.socket
|
||||
dest=/etc/systemd/system/
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: Create a folder for systemd unit files that are docker containers
|
||||
file: path=/etc/systemd/system/docker.service.d
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
state=directory
|
||||
|
||||
- name: Enable docker
|
||||
service: name=docker
|
||||
state=started
|
||||
enabled=true
|
||||
when: docker_enabled | bool
|
||||
|
||||
- name: Disable docker
|
||||
service: name=docker
|
||||
state=stopped
|
||||
enabled=false
|
||||
when: not docker_enabled
|
||||
|
||||
- name: Add 'docker' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: docker
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value | string }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: Docker Container
|
||||
- option: description
|
||||
value: '"Docker allows a person to package an application with all of its dependencies into a standardized unit for software development."'
|
||||
- option: enabled
|
||||
value: "{{ docker_enabled }}"
|
||||
26
roles/0-DEPRECATED-ROLES/docker/templates/docker.service
Normal file
26
roles/0-DEPRECATED-ROLES/docker/templates/docker.service
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[unit]
|
||||
Description=Docker Application Container Engine
|
||||
Documentation=https://docs.docker.com
|
||||
After=network.target docker.socket
|
||||
Requires=docker.socket
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
# the default is not to use systemd for cgroups because the delegate issues still
|
||||
# exists and systemd currently does not support the cgroup feature set required
|
||||
# for containers run by docker
|
||||
ExecStart=/usr/bin/docker daemon
|
||||
MountFlags=slave
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
LimitCORE=infinity
|
||||
# Uncomment TasksMax if your systemd version supports it.
|
||||
# Only systemd 226 and above support this version.
|
||||
#TasksMax=infinity
|
||||
TimeoutStartSec=0
|
||||
# set delegate yes so that systemd does not reset the cgroups of docker containers
|
||||
Delegate=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
13
roles/0-DEPRECATED-ROLES/docker/templates/docker.socket
Normal file
13
roles/0-DEPRECATED-ROLES/docker/templates/docker.socket
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[unit]
|
||||
Description=Docker Socket for the API
|
||||
PartOf=docker.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=/var/run/docker.sock
|
||||
SocketMode=0660
|
||||
SocketUser=root
|
||||
SocketGroup=docker
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue