diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..93b92bb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "**/*.yml": "ansible" + } +} \ No newline at end of file diff --git a/README.md b/README.md index b29abe5..5992329 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,11 @@ Available variables are listed below, along with default values (see `defaults/m # Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition). docker_edition: 'ce' - docker_package: "docker-{{ docker_edition }}" - docker_package_state: present + docker_packages: + - "docker-{{ docker_edition }}" + - "docker-{{ docker_edition }}-cli" + - containerd.io + docker_packages_state: present The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). You can also specify a specific version of Docker to install using the distribution-specific format: Red Hat/CentOS: `docker-{{ docker_edition }}-`; Debian/Ubuntu: `docker-{{ docker_edition }}=`. diff --git a/meta/main.yml b/meta/main.yml index e991750..13220c7 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -6,7 +6,7 @@ galaxy_info: description: Docker for Linux. license: "license (BSD, MIT)" role_name: docker - min_ansible_version: 2.4 + min_ansible_version: 3.0 platforms: - name: EL versions: diff --git a/tasks/main.yml b/tasks/main.yml index 457306e..d536ff8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,6 +17,8 @@ state: "{{ docker_service_state }}" enabled: "{{ docker_service_enabled }}" +# TODO: Добавить cron на отчистку диска + - name: Ensure handlers are notified now to avoid firewall conflicts. meta: flush_handlers diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index ab0f7d9..9883f5a 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -14,6 +14,8 @@ name: - apt-transport-https - ca-certificates + - gnupg-agent + - zfsutils-linux state: present - name: Add Docker apt key. diff --git a/templates/apt-preferences-docker.j2 b/templates/apt-preferences-docker.j2 index d04d978..cc37028 100644 --- a/templates/apt-preferences-docker.j2 +++ b/templates/apt-preferences-docker.j2 @@ -1,7 +1,7 @@ -Package: {{ docker_package }} +Package: docker-{{ docker_edition }} Pin: version {{ docker_apt_version }}.* Pin-Priority: 1000 -Package: {{ docker_package }}-cli +Package: docker-{{ docker_edition }}-cli Pin: version {{ docker_apt_version }}.* Pin-Priority: 1000 \ No newline at end of file