Skip to content

Commit

Permalink
Merge pull request #221 from konstruktoid/rewrite
Browse files Browse the repository at this point in the history
include with file param
  • Loading branch information
konstruktoid authored Oct 6, 2023
2 parents 113d58e + 1e699a2 commit 05e8c11
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
- name: Install required packages and configure sysctl
ansible.builtin.include_tasks: pre.yml
ansible.builtin.include_tasks:
file: pre.yml

- name: Manage Docker user
ansible.builtin.include_tasks: manage_user.yml
ansible.builtin.include_tasks:
file: manage_user.yml

- name: Remove obselete Docker instruction file
ansible.builtin.file:
Expand All @@ -18,22 +20,26 @@
when: docker_rootful and not (ansible_distribution == "Debian" and ansible_distribution_major_version <= '10')
block:
- name: Install rootful Docker
ansible.builtin.include_tasks: docker_install_rootful.yml
ansible.builtin.include_tasks:
file: docker_install_rootful.yml

- name: Configure rootful Docker service
ansible.builtin.include_tasks: docker_service_rootful.yml
ansible.builtin.include_tasks:
file: docker_service_rootful.yml

- name: Debian information
ansible.builtin.fail:
msg: slirp4netns (>= 0.4.0) is required, currently not available in Debian <= 10
when: docker_rootful and (ansible_distribution == "Debian" and ansible_distribution_major_version <= '10')

- name: Install and configure rootless Docker
ansible.builtin.include_tasks: docker_install_rootless.yml
ansible.builtin.include_tasks:
file: docker_install_rootless.yml
when: not docker_rootful

- name: Install Docker Compose
ansible.builtin.include_tasks: docker_compose.yml
ansible.builtin.include_tasks:
file: docker_compose.yml
when: docker_compose

- name: Add user sudo alias
Expand Down Expand Up @@ -81,5 +87,6 @@
when: docker_rootful or not docker_add_alias | bool

- name: Deploy bash completion
ansible.builtin.include_tasks: bashrc.yml
ansible.builtin.include_tasks:
file: bashrc.yml
when: docker_user_bashrc

0 comments on commit 05e8c11

Please sign in to comment.