Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
traefik: wait for marathon before starting (smlr)
Browse files Browse the repository at this point in the history
fixes #1073
  • Loading branch information
ryane committed Mar 16, 2016
1 parent a428454 commit bcd49ac
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
19 changes: 10 additions & 9 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
tags:
- bootstrap

- name: enable yum repos
sudo: yes
copy:
src: "{{ item }}"
dest: "/etc/yum.repos.d/{{ item }}"
with_items:
- asteris-mantl-rpm.repo
- ciscocloud-rpm.repo

- name: install system utilities
sudo: yes
yum:
Expand All @@ -48,6 +57,7 @@
- unzip
- jq
- java-1.8.0-openjdk
- smlr
tags:
- bootstrap

Expand Down Expand Up @@ -92,15 +102,6 @@
- security
- bootstrap

- name: enable yum repos
sudo: yes
copy:
src: "{{ item }}"
dest: "/etc/yum.repos.d/{{ item }}"
with_items:
- asteris-mantl-rpm.repo
- ciscocloud-rpm.repo

- include: users.yml
- include: ssl.yml
- include: distributive.yml
Expand Down
6 changes: 5 additions & 1 deletion roles/traefik/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
sudo: yes
command: systemctl reload consul

- name: reload systemd
sudo: yes
command: systemctl daemon-reload

- name: restart traefik
sudo: yes
command: systemctl restart traefik
command: systemctl restart traefik
23 changes: 23 additions & 0 deletions roles/traefik/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@
- traefik
- bootstrap

- name: create directory for local traefik service override
sudo: yes
file:
dest: /etc/systemd/system/traefik.service.d
state: directory
mode: 0755
tags:
- traefik
- bootstrap

- name: create local traefik service override
sudo: yes
copy:
dest: /etc/systemd/system/traefik.service.d/marathon.conf
content: |
[Service]
ExecStartPre=-smlr {{ traefik_marathon_endpoint }}/v2/leader
notify:
- reload systemd
- restart traefik
tags:
- traefik

- name: make certificate directory
sudo: yes
file:
Expand Down

0 comments on commit bcd49ac

Please sign in to comment.