summaryrefslogtreecommitdiff
path: root/roles/docker/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r--roles/docker/tasks/docker-com.yml19
-rw-r--r--roles/docker/tasks/lvm.yml18
-rw-r--r--roles/docker/tasks/main.yml45
-rw-r--r--roles/docker/tasks/zfs.yml14
4 files changed, 0 insertions, 96 deletions
diff --git a/roles/docker/tasks/docker-com.yml b/roles/docker/tasks/docker-com.yml
deleted file mode 100644
index f44d2755..00000000
--- a/roles/docker/tasks/docker-com.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- name: add repository key
- copy:
- src: docker-com.gpg
- dest: /etc/apt/trusted.gpg.d/docker.gpg
- register: apt_repo_docker_com_key
-
-- name: add repository entry
- copy:
- content: |
- deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
- dest: /etc/apt/sources.list.d/docker.list
- register: apt_repo_docker_com_key
-
-- name: update apt cache
- when: apt_repo_docker_com_key is changed or
- apt_repo_docker_com_sources is changed
- apt:
- update_cache: yes
diff --git a/roles/docker/tasks/lvm.yml b/roles/docker/tasks/lvm.yml
deleted file mode 100644
index 34cbab0f..00000000
--- a/roles/docker/tasks/lvm.yml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- name: create logical volume
- lvol:
- vg: "{{ docker_lvm.vg }}"
- lv: "{{ docker_lvm.lv }}"
- size: "{{ docker_lvm.size }}"
-
-- name: create filesystem
- filesystem:
- fstype: "{{ docker_lvm.fs }}"
- dev: "/dev/mapper/{{ docker_lvm.vg | replace('-', '--') }}-{{ docker_lvm.lv | replace('-', '--') }}"
-
-- name: mount filesytem
- mount:
- src: "/dev/mapper/{{ docker_lvm.vg | replace('-', '--') }}-{{ docker_lvm.lv | replace('-', '--') }}"
- path: /var/lib/docker
- fstype: "{{ docker_lvm.fs }}"
- state: mounted
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
deleted file mode 100644
index 62712551..00000000
--- a/roles/docker/tasks/main.yml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- name: install docker daemon config
- when: docker_daemon_config is defined
- block:
- - name: create docker config directory
- file:
- name: /etc/docker
- state: directory
- mode: 0700
-
- - name: write docker daemon config
- copy:
- content: "{{ docker_daemon_config | to_nice_json }}\n"
- dest: /etc/docker/daemon.json
-# notify: restart docker ### this does not work on first install because adding the repo might flush handlers...
-
-- name: prepare /var/lib/docker as LVM
- when: docker_lvm is defined
- import_tasks: lvm.yml
-
-- name: prepare /var/lib/docker as ZFS dataset
- when: docker_zfs is defined
- import_tasks: zfs.yml
-
-- name: prepare package provider
- when: docker_pkg_provider != 'distro'
- include_tasks: "{{ docker_pkg_provider }}.yml"
-
-- name: install docker
- apt:
- name: "{{ docker_pkg_name }}{% if docker_pkg_version is defined %}={{ docker_pkg_version }}{% endif %}"
- state: present
- force: yes
-
-- name: disable automatic upgrades for docker package
- when: docker_pkg_version is defined
- dpkg_selections:
- name: "{{ docker_pkg_name }}"
- selection: hold
-
-- name: Start and enable docker
- service:
- name: docker
- enabled: true
- state: started
diff --git a/roles/docker/tasks/zfs.yml b/roles/docker/tasks/zfs.yml
deleted file mode 100644
index e8289c7d..00000000
--- a/roles/docker/tasks/zfs.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: create zfs dataset
- zfs:
- name: "{{ docker_zfs.pool }}/{{ docker_zfs.name }}"
- state: present
- extra_zfs_properties: "{{ docker_zfs.properties | default(omit) }}"
-
-- name: bind mount filesytem
- mount:
- src: "{{ zfs_pools[docker_zfs.pool].mountpoint }}/{{ docker_zfs.name }}"
- path: /var/lib/docker
- fstype: none
- opts: bind,x-systemd.automount,nofail
- state: mounted