diff --git a/.gitignore b/.gitignore index 3b00433..1bc9341 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ .vagrant /*.yml /*.yaml -/prod/ -/production/ -/stage/ -/staging/ !moxie.yml +/environments/ diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..c7cfe03 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory = ./environments/development diff --git a/roles/traefik/defaults/main.yml b/roles/traefik/defaults/main.yml new file mode 100644 index 0000000..9ec3f9d --- /dev/null +++ b/roles/traefik/defaults/main.yml @@ -0,0 +1,3 @@ +traefik_version: latest +traefik_port: 8000 +traefik_admin_port: 8080 diff --git a/roles/traefik/tasks/main.yml b/roles/traefik/tasks/main.yml index f00c1a1..3aaf396 100644 --- a/roles/traefik/tasks/main.yml +++ b/roles/traefik/tasks/main.yml @@ -6,11 +6,11 @@ - name: Start Traefik container docker_container: name: traefik - image: traefik:2.0.2 + image: traefik:{{ traefik_version }} restart_policy: always ports: - - 8000:80 - - 8080:8080 + - "{{ traefik_port }}:80" + - "{{ traefik_admin_port }}:8080" volumes: - ./traefik.yml:/etc/traefik/traefik.yml - /var/run/docker.sock:/var/run/docker.sock