add docker_use_dist_repo variable + default

to decide for install source repo
and add to README
This commit is contained in:
2023-10-06 20:46:22 +02:00
parent 8c449aa986
commit d0adf1a301
3 changed files with 17 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Ansible Collection - `dede.common` # Ansible Collection - dede.common
this ansible collection primarily aims to provide common roles that i've been building this ansible collection primarily aims to provide common roles that i've been building
for either my home or the wululu web network and systems. for either my home or the wululu web network and systems.
@@ -6,4 +6,17 @@ for either my home or the wululu web network and systems.
by publishing it i hope it can be useful for anyone looking for inspiration by publishing it i hope it can be useful for anyone looking for inspiration
or even roles ready-to-go. or even roles ready-to-go.
please mind that everything in this collection mainly focuses debian as a server operating system.
thus i will not add features specific to other operating systems unless i need to.
if you have any questions feel free to get in touch with me. if you have any questions feel free to get in touch with me.
## roles
* **test**
a simple role to test ansible or just this collection
* **docker**
a docker install role that can install docker-ce engine in two ways:
1. from the official docker repository (recommended by docker)
2. from your distribution
you can switch to the distribution method by setting `docker_use_dist_repo` to `true` (defaults to `false`).

View File

@@ -0,0 +1,2 @@
---
docker_use_dist_repo: false

View File

@@ -1,4 +1,4 @@
--- ---
- name: include proper install tasks - name: include proper install tasks
ansible.builtin.import_tasks: ansible.builtin.import_tasks:
file: "{{ docker_type | default('docker') }}.yml" file: "{{ 'dist' if docker_use_dist_repo else 'docker' }}.yml"