Skip to content

Commit

Permalink
Authorize custom templates for systemd configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovic-gasc committed Dec 22, 2017
1 parent 6fce520 commit 23caf9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Role Variables
* `ah_version`: Version to clone (default to `master`).
* `ah_requirements_path`: Path to python requirements file (default to `requirements.txt`).
* `ah_sockets`: List of listening sockets (default to `[0.0.0.0:8000]`).
* `ah_systemd_socket_template`: Custom template for systemd socket (default to `etc/systemd/system/project.socket.j2`).
* `ah_systemd_service_template`: Custom template for systemd service (default to `etc/systemd/system/project.service.j2`).

Example Playbook
----------------
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

- name: Configure systemd socket
template:
src: etc/systemd/system/project.socket.j2
src: "{{ ah_systemd_socket_template | default('etc/systemd/system/project.socket.j2') }}"
dest: "/etc/systemd/system/{{ ah_name }}.socket"
force: yes
notify:
Expand All @@ -65,7 +65,7 @@

- name: Configure systemd service
template:
src: etc/systemd/system/project.service.j2
src: "{{ ah_systemd_service_template | default('etc/systemd/system/project.service.j2') }}"
dest: "/etc/systemd/system/{{ ah_name }}.service"
force: yes
notify:
Expand Down

0 comments on commit 23caf9a

Please sign in to comment.