Skip to content

Commit 8093977

Browse files
authored
Stop using facts as vars (#26)
* Stop using facts as vars * Stop using facts as vars
1 parent c14216b commit 8093977

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

molecule/common/prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
tasks:
88
- name: Set name of sudo group as fact
99
ansible.builtin.set_fact:
10-
sudo_group: "{{ 'sudo' if ansible_os_family == 'Debian' else 'wheel' }}"
10+
sudo_group: "{{ 'sudo' if ansible_facts['os_family'] == 'Debian' else 'wheel' }}"
1111

1212
- name: Create group {{ sudo_group }}
1313
ansible.builtin.group:

tasks/install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Set correct libc flavor
3-
when: ansible_system == 'Linux'
3+
when: ansible_facts['system'] == 'Linux'
44
block:
55
- name: Get libc version
66
ansible.builtin.shell:
@@ -15,7 +15,7 @@
1515

1616
- name: Set package name as fact
1717
ansible.builtin.set_fact:
18-
nushell_package: "nu-{{ _nushell_version }}-{{ arch_map[ansible_architecture] | default(ansible_architecture) }}-{{ 'unknown-linux-' + libc_flavor if ansible_system == 'Linux' else 'apple-darwin' }}"
18+
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' }}"
1919

2020
- name: Extract package
2121
ansible.builtin.unarchive:

vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
nushell_config_path: "{{ 'Library/Application Support/nushell' if ansible_system == 'Darwin' else '.config/nushell' }}"
2+
nushell_config_path: "{{ 'Library/Application Support/nushell' if ansible_facts['system'] == 'Darwin' else '.config/nushell' }}"
33
releases_endpoint: https://api.github.com/repos/nushell/nushell/releases
44
min_glibc_version: '2.32'
55
arch_map:

0 commit comments

Comments
 (0)