Skip to content

Commit

Permalink
Merge pull request #2 from remerge/configurable-access-address
Browse files Browse the repository at this point in the history
configurable access address
  • Loading branch information
sixtus authored Dec 5, 2022
2 parents 3613539 + 9774cfe commit 86d3cb1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
sft_canonical_name: "{{ inventory_hostname }}"
sft_access_address: "{{ ansible_default_ipv4.address }}"
8 changes: 2 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@
mode: 0700

- name: Create sftd config file
ansible.builtin.copy:
ansible.builtin.template:
source: sftd.yaml.j2
dest: /etc/sft/sftd.yaml
content: |
---
EnrollmentTokenFile: /var/lib/sftd/enrollment.token
CanonicalName: "{{ inventory_hostname }}"
AccessAddress: "{{ ansible_default_ipv4.address }}"
owner: root
group: root
mode: 0644
Expand Down
4 changes: 4 additions & 0 deletions templates/sftd.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
EnrollmentTokenFile: /var/lib/sftd/enrollment.token
CanonicalName: "{{ sft_canonical_name }}"
AccessAddress: "{{ sft_access_address }}"

0 comments on commit 86d3cb1

Please sign in to comment.