Ansible playbook for setting up and provisioning a private docker registry.
Ansible playbook for setting up and provisioning a private docker registry.
This ansible playbook will install docker if not done so already, and any other necessary packages or modules. This playbook also supports NGINX proxying if a host is specified in the NGINX host group.
Playbook inventory variables can be found in groupvars/all.yml
.
registry_port: Port for NGINX registry to bind to.
registry_user: Registry username for http auth (for NGINX).
registry_pass: Registry password for http auth (for NGINX).
git
ansible 2 - 2.3
Due to a change in version 2.4 explained here, any version of ansible above 2.3.x is not recommended.
Clone the repository,
git clone https://github.com/neetjn/ansible-docker-registry.git
Run the playbook,
ansible-playbook playbook.yml
Optionally, if you would like to configure a remote ystem:
hosts
inventory file.ansible-ssh-user
and ansible-ssh-pass
variables from your group variables.Then run your playbook,
ansible-playbook playbook.yml -i hosts
Additionally if you would like to setup NGINX:
registry_user
and registry_pass
variables in your group variables to reflect your desired credentials.--extra-vars "registry_host=mydomain.com"
to then end of your ansible-playbook command.Copyright (c) 2017 John Nolette Licensed under the MIT license.