M tasks/main.yml => tasks/main.yml +9 -6
@@ 20,28 20,31 @@
- name: tor hidden service public key
copy:
- dest: "/var/lib/tor/{{ item.onion }}/hostname"
+ dest: "/var/lib/tor/{{ item.name }}/hostname"
+ content: "{{ item.onion }}"
owner: debian-tor
group: debian-tor
- mode: 0640
+ mode: 0600
when: item.onion is defined
loop: "{{ tor_hidden_services }}"
- name: tor hidden service public key
copy:
- dest: "/var/lib/tor/{{ item.public_key }}/hs_ed25519_public_key"
+ dest: "/var/lib/tor/{{ item.name }}/hs_ed25519_public_key"
+ content: "{{ item.public_key }}"
owner: debian-tor
group: debian-tor
- mode: 0640
+ mode: 0600
when: item.public_key is defined
loop: "{{ tor_hidden_services }}"
- name: tor hidden service public key
copy:
- dest: "/var/lib/tor/{{ item.priv_key }}/hs_ed25519_secret_key"
+ dest: "/var/lib/tor/{{ item.name }}/hs_ed25519_secret_key"
+ content: "{{ item.priv_key }}"
owner: debian-tor
group: debian-tor
- mode: 0640
+ mode: 0600
when: item.priv_key is defined
loop: "{{ tor_hidden_services }}"