2 # tasks file for preflight
3 - name: Check user vpn directory existence
5 path: "{{ lookup('env','HOME') }}/{{ user_name }}"
8 - name: Log user vpn directory status on console
10 msg: "The user vpn directory {{ lookup('env','HOME') }}/{{ user_name }} is already exist"
11 when: uservpn_dir.stat.exists
13 - name: Create directory to user vpn files
15 path: "{{ lookup('env','HOME') }}/{{ user_name }}"
19 when: not uservpn_dir.stat.exists
21 - name: Set fact for user vpn files directory
23 vpn_user_files_location: "{{ lookup('env','HOME') }}/{{ user_name }}"