Use ansible_facts.xxx instead of ansible_xxx. (#980)

This commit is contained in:
Felix Fontein
2026-02-07 16:12:21 +01:00
committed by GitHub
parent e91f8ec520
commit b5a9a41913
23 changed files with 57 additions and 57 deletions

View File

@@ -9,13 +9,13 @@
####################################################################
- name: Include OS-specific variables
ansible.builtin.include_vars: '{{ ansible_os_family }}.yml'
when: not ansible_os_family == "Darwin" and not ansible_os_family == "FreeBSD"
ansible.builtin.include_vars: '{{ ansible_facts.os_family }}.yml'
when: not ansible_facts.os_family == "Darwin" and not ansible_facts.os_family == "FreeBSD"
- name: Install ssh-keygen
ansible.builtin.package:
name: '{{ openssh_client_package_name }}'
when: not ansible_os_family == "Darwin" and not ansible_os_family == "FreeBSD"
when: not ansible_facts.os_family == "Darwin" and not ansible_facts.os_family == "FreeBSD"
- name: Get ssh version
ansible.builtin.shell: ssh -Vq 2>&1|sed 's/^.*OpenSSH_\([0-9]\{1,\}\.[0-9]\{1,\}\).*$/\1/'