- is_wsl variable fixed

- names with spaces revised
This commit is contained in:
marmattheo 2025-10-05 06:20:07 +00:00
parent 3f1fe7ef5c
commit 716c4e3b8d
3 changed files with 4 additions and 4 deletions

2
lenverge.sh Normal file → Executable file
View File

@ -6,7 +6,7 @@
# Find the script's own directory to run from the correct location,
# ensuring that playbook.yml and other files are found.
chmod +x /home/$(whoami)
chmod +x "/home/$(whoami)"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"

View File

@ -24,7 +24,7 @@
- name: "Set is_wsl fact based on /proc/version content"
ansible.builtin.set_fact:
is_wsl: "'Microsoft' in (lookup('file', '/proc/version') | default(''))"
is_wsl: "{{ 'Microsoft' in (lookup('file', '/proc/version') | default('')) }}"
when: proc_version_stat.stat.exists
- name: "Ensure correct automount options are set in /etc/wsl.conf"
@ -40,7 +40,7 @@
enabled = true
options = "metadata,uid={{ ansible_user_uid }},gid={{ ansible_user_gid }},umask=22,fmask=11"
[user]
default = {{ ansible_env.SUDO_USER | default(ansible_user_id) }}
default = "{{ ansible_env.SUDO_USER | default(ansible_user_id) }}"
register: wsl_conf_result
when: is_wsl | default(false)

View File

@ -2,7 +2,7 @@ server {
listen 80;
server_name {{ project.domain }};
root {{ project.document_root }};
root "{{ project.document_root }}";
index index.php;
access_log /var/log/nginx/{{ project.domain }}-access.log;