Skip to content

Instantly share code, notes, and snippets.

@ederparaiso
Created November 27, 2018 21:10
Show Gist options
  • Save ederparaiso/d33cf4c40b43010aada75719c85dbe58 to your computer and use it in GitHub Desktop.
Save ederparaiso/d33cf4c40b43010aada75719c85dbe58 to your computer and use it in GitHub Desktop.
provision nexus repository manager with ansible
- 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