changed local path for fetched and resent wireguard client configuration file
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -20,7 +20,7 @@ uv.lock
|
|||||||
/.devcontainer/
|
/.devcontainer/
|
||||||
.lock
|
.lock
|
||||||
/.cache/
|
/.cache/
|
||||||
/roles/**/files/user/wg/containerized/*.conf
|
/roles/**/files/user/wg/authorized_clients.d/*.conf
|
||||||
|
|
||||||
# Try tyo avoid any plain-text passwords
|
# Try tyo avoid any plain-text passwords
|
||||||
*pwd*
|
*pwd*
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
- name: Dupliciating DSNet VPN service client configuration files to control node
|
- name: Dupliciating DSNet VPN service client configuration files to control node
|
||||||
ansible.builtin.fetch:
|
ansible.builtin.fetch:
|
||||||
src: "{{ ansible_user_home.stdout }}/.wg/authorized_clients.d/{{ item.name }}{{ (idx | string) }}.conf"
|
src: "{{ ansible_user_home.stdout }}/.wg/authorized_clients.d/{{ item.name }}{{ (idx | string) }}.conf"
|
||||||
dest: "./roles/init-server/files/user/wg/containerized/{{ item.name }}{{ (idx | string) }}.conf"
|
dest: "./roles/init-server/files/user/wg/authorized_clients.d/{{ item.name }}{{ (idx | string) }}.conf"
|
||||||
flat: true
|
flat: true
|
||||||
loop: "{{ vpn.clients }}"
|
loop: "{{ vpn.clients }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Creating subdirectory for VPN client container specified by Compose file
|
- name: Creating subdirectory for VPN client container specified by Compose file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ ansible_user_home.stdout }}/.wg/containerized"
|
path: "{{ ansible_user_home.stdout }}/.wg/authorized_clients.d"
|
||||||
recurse: true
|
recurse: true
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
@@ -183,8 +183,8 @@
|
|||||||
become_user: "{{ current_user.stdout }}"
|
become_user: "{{ current_user.stdout }}"
|
||||||
when: ((fqdn is defined and fqdn != None) and item.name == fqdn) or item.name == inventory_hostname
|
when: ((fqdn is defined and fqdn != None) and item.name == fqdn) or item.name == inventory_hostname
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "user/wg/containerized/{{ item.name }}{{ (idx | string) }}.conf"
|
src: "user/wg/authorized_clients.d/{{ item.name }}{{ (idx | string) }}.conf"
|
||||||
dest: "{{ ansible_user_home.stdout }}/.wg/containerized/"
|
dest: "{{ ansible_user_home.stdout }}/.wg/authorized_clients.d/"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
mode: "644"
|
mode: "644"
|
||||||
|
|||||||
Reference in New Issue
Block a user