Skip to content

Commit

Permalink
allow to specify systemd unit name (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps authored Jul 13, 2024
1 parent 07f7b75 commit 2781050
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ etcd_download_url: "https://github.com/etcd-io/etcd/releases/download/v{{ etcd_v
# changed to your needs.
etcd_download_url_checksum: "sha256:https://github.com/coreos/etcd/releases/download/v{{ etcd_version }}/SHA256SUMS"

# Name for etcd systemd unit
etcd_service_name: "etcd"

# Options for [Service] section. For more information see:
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Options
# The options below "Type=notify" are mostly security/sandbox related settings
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
- name: Create systemd unit file
ansible.builtin.template:
src: etc/systemd/system/etcd.service.j2
dest: /etc/systemd/system/etcd.service
dest: "/etc/systemd/system/{{ etcd_service_name }}.service"
owner: "root"
group: "root"
mode: "0644"
Expand All @@ -154,7 +154,7 @@

- name: Enable and start etcd
ansible.builtin.service:
name: etcd
name: "{{ etcd_service_name }}"
enabled: true
state: started
tags:
Expand Down

0 comments on commit 2781050

Please sign in to comment.