opsta.install_docker
Docker installieren
Ansible-Rolle zur Installation von Docker und zur ersten Konfiguration für Ubuntu-Hosts
- Docker installieren
- SSH-Benutzer zur Gruppe "docker" hinzufügen
- DOCKER_OPTS konfigurieren
- In das private Docker-Repository einloggen
- docker-py installieren
Hier können Sie ein Beispiel sehen, wie man ein Playbook, Konfigurationen und Beispielbefehle erstellt: https://github.com/winggundamth/ansible-wing-playbook
Anforderungen
Keine
Rollenvariablen
# Dies sind die Standardvariablen
install_docker_option: --storage-driver=overlay
install_docker_private_login: false
install_docker_py: false
# Dies sind optionale Variablen
# Verwenden, wenn install_docker_private_login auf true gesetzt ist
install_docker_registry_username: registry
install_docker_registry_password: CHANGEDOCKERPASSWORDHERE
install_docker_registry_email: [email protected]
install_docker_registry_url: registry.example.com
# Genutzt für RedHat/CentOS/Fedora.
install_docker_repo_url: https://download.docker.com/linux
install_docker_yum_repo_url: "{{ install_docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-ce.repo"
install_docker_yum_gpg_key: "{{ install_docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/gpg"
Abhängigkeiten
Keine
Beispiel-Playbook
- hosts: all
gather_facts: no
become: true
roles:
- winggundamth.install_docker
vars_files:
- "{{ install_docker_vars_file }}"
Liste nützlicher Tags
Es gibt einige nützliche Tags, die Sie verwenden können, um die Docker-Konfiguration zu verwalten
- install-docker-private-login
- install-docker-configure
- install-docker
- install-docker-py
Lizenz
MIT
Autoreninformation
Sie können meine Arbeiten unter https://github.com/winggundamth einsehen.