fix(common): replace deprecated ansible_ fact references with ansible_facts[]

This commit is contained in:
Tuan-Dat Tran
2026-06-03 02:17:08 +02:00
parent aa8b591afd
commit 956836dc67
6 changed files with 28 additions and 28 deletions

View File

@@ -37,21 +37,21 @@
register: neovim_installed
changed_when: false
ignore_errors: true
when: ansible_architecture != 'aarch64'
when: ansible_facts['architecture'] != 'aarch64'
- name: Download Neovim AppImage
ansible.builtin.get_url:
url: https://github.com/neovim/neovim/releases/download/v0.10.0/nvim.appimage
dest: /tmp/nvim.appimage
mode: "0755"
when: ansible_architecture != 'aarch64' and neovim_installed.rc != 0
when: ansible_facts['architecture'] != 'aarch64' and neovim_installed.rc != 0
register: download_result
- name: Extract Neovim AppImage
ansible.builtin.command:
cmd: "./nvim.appimage --appimage-extract"
chdir: /tmp
when: ansible_architecture != 'aarch64' and download_result.changed
when: ansible_facts['architecture'] != 'aarch64' and download_result.changed
register: extract_result
- name: Copy extracted Neovim files to /usr
@@ -61,19 +61,19 @@
remote_src: true
mode: "0755"
become: true
when: ansible_architecture != 'aarch64' and extract_result.changed
when: ansible_facts['architecture'] != 'aarch64' and extract_result.changed
- name: Clean up extracted Neovim files
ansible.builtin.file:
path: /tmp/squashfs-root
state: absent
when: ansible_architecture != 'aarch64' and extract_result.changed
when: ansible_facts['architecture'] != 'aarch64' and extract_result.changed
- name: Remove Neovim AppImage
ansible.builtin.file:
path: /tmp/nvim.appimage
state: absent
when: ansible_architecture != 'aarch64' and download_result.changed
when: ansible_facts['architecture'] != 'aarch64' and download_result.changed
- name: Check if Neovim config directory already exists
ansible.builtin.stat: