Created
November 27, 2018 21:10
-
-
Save ederparaiso/d33cf4c40b43010aada75719c85dbe58 to your computer and use it in GitHub Desktop.
provision nexus repository manager with ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: host-list | |
sudo: yes | |
tasks: | |
- name: "Install pip" | |
easy_install: | |
name: pip | |
- name: "Install docker-py" | |
pip: | |
name: docker-py | |
- name: "Create nexus-data dir and make it writable by the Nexus process, which runs as UID 200" | |
file: | |
path: "/data/nexus-data" | |
state: directory | |
owner: 200 | |
group: 200 | |
recurse: yes | |
- name: "Start nexus container" | |
docker_container: | |
name: nexus | |
image: sonatype/nexus3:3.14.0 | |
detach: true | |
restart_policy: unless-stopped | |
ports: | |
- "8081:8081" | |
volumes: | |
- /data/nexus-data:/nexus-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment