opsta.install_docker
Install Docker
This is an Ansible role that helps you install Docker on an Ubuntu host and set it up for initial use. Here's what it does:
- Installs Docker
- Adds the SSH user to the Docker group
- Configures Docker options
- Logs in to a private Docker registry
- Installs the Docker Python library (
docker-py
)
You can find examples of how to create playbooks, configurations, and sample commands here.
Requirements
None
Role Variables
# Default variables
install_docker_option: --storage-driver=overlay
install_docker_private_login: false
install_docker_py: false
# Optional variables (use only if install_docker_private_login is true)
install_docker_registry_username: registry
install_docker_registry_password: CHANGEDOCKERPASSWORDHERE
install_docker_registry_email: [email protected]
install_docker_registry_url: registry.example.com
# For RedHat/CentOS/Fedora systems
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"
Dependencies
None
Example Playbook
- hosts: all
gather_facts: no
become: true
roles:
- winggundamth.install_docker
vars_files:
- "{{ install_docker_vars_file }}"
Useful Tags
Here are some useful tags you can use to manage Docker configuration:
install-docker-private-login
install-docker-configure
install-docker
install-docker-py
License
MIT License
Author Information
You can see more of my work at GitHub.
Informazioni sul progetto
Ansible role to install Docker and do some initial configuration for Ubuntu host
Installa
ansible-galaxy install opsta.install_docker
Licenza
mit
Download
834
Proprietario
We build scale