diff --git a/molecule/common/prepare.yml b/molecule/common/prepare.yml index 6aa592e..ccc4de5 100644 --- a/molecule/common/prepare.yml +++ b/molecule/common/prepare.yml @@ -7,7 +7,7 @@ tasks: - name: Set name of sudo group as fact ansible.builtin.set_fact: - sudo_group: "{{ 'sudo' if ansible_os_family == 'Debian' else 'wheel' }}" + sudo_group: "{{ 'sudo' if ansible_facts['os_family'] == 'Debian' else 'wheel' }}" - name: Create group {{ sudo_group }} ansible.builtin.group: diff --git a/tasks/install.yml b/tasks/install.yml index 36059e8..f19eb17 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,6 +1,6 @@ --- - name: Set correct libc flavor - when: ansible_system == 'Linux' + when: ansible_facts['system'] == 'Linux' block: - name: Get libc version ansible.builtin.shell: @@ -15,7 +15,7 @@ - name: Set package name as fact ansible.builtin.set_fact: - nushell_package: "nu-{{ _nushell_version }}-{{ arch_map[ansible_architecture] | default(ansible_architecture) }}-{{ 'unknown-linux-' + libc_flavor if ansible_system == 'Linux' else 'apple-darwin' }}" + nushell_package: "nu-{{ _nushell_version }}-{{ arch_map[ansible_facts['architecture']] | default(ansible_facts['architecture']) }}-{{ 'unknown-linux-' + libc_flavor if ansible_facts['system'] == 'Linux' else 'apple-darwin' }}" - name: Extract package ansible.builtin.unarchive: diff --git a/vars/main.yml b/vars/main.yml index c6befc7..fe9b098 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,5 +1,5 @@ --- -nushell_config_path: "{{ 'Library/Application Support/nushell' if ansible_system == 'Darwin' else '.config/nushell' }}" +nushell_config_path: "{{ 'Library/Application Support/nushell' if ansible_facts['system'] == 'Darwin' else '.config/nushell' }}" releases_endpoint: https://api.github.com/repos/nushell/nushell/releases min_glibc_version: '2.32' arch_map: