Skip to content

Commit

Permalink
#9 Ability of providing templates via playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose committed Sep 10, 2018
1 parent c9686ef commit a46fcb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ prom2teams_group: prom2teams
prom2teams_service_state: started
prom2teams_service_enabled: True

# Files & Paths
# prom2teams Files & Paths
prom2teams_config_folder: /opt/prom2teams
prom2teams_config_absolute_path: "{{ prom2teams_config_folder }}/config.ini"

Expand All @@ -23,6 +23,10 @@ prom2teams_logs_absolute_path: "{{ prom2teams_logs_folder }}/prom2teams.log"

prom2teams_pid_absolute_path: /var/run/prom2teams/prom2teams.pid

# Templates paths
prom2teams_config_template_path: "config.ini.j2"
prom2teams_service_template_path: "prom2teams.service.j2"

## prom2teams configuration
prom2teams_host: 0.0.0.0
prom2teams_port: 8089
2 changes: 1 addition & 1 deletion tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

- name: prom2teams | Copy prom2teams configuration
template:
src: "config.ini.j2"
src: "{{ prom2teams_config_template_path }}"
dest: "{{ prom2teams_config_folder }}/config.ini"
mode: 0644
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

- name: prom2teams | Copy Daemon script
template:
src: "prom2teams.service.j2"
src: "{{ prom2teams_service_template_path }}"
dest: /lib/systemd/system/prom2teams.service
mode: 0644

0 comments on commit a46fcb3

Please sign in to comment.