use distribution for os checks
This commit is contained in:
parent
8f5120a005
commit
7884f6562e
1 changed files with 4 additions and 4 deletions
|
|
@ -12,7 +12,7 @@
|
||||||
become: true
|
become: true
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when: ansible_facts['os_family'] == 'Debian' or ansible_facts['os_family'] == 'Ubuntu'
|
when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu'
|
||||||
|
|
||||||
- name: update pacman cache
|
- name: update pacman cache
|
||||||
become: true
|
become: true
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
apt_key:
|
apt_key:
|
||||||
url: '{{ node_gpg_key }}'
|
url: '{{ node_gpg_key }}'
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == 'Debian'
|
when: ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
- name: add nodesource source
|
- name: add nodesource source
|
||||||
become: true
|
become: true
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
src: 'nodesource.list.j2'
|
src: 'nodesource.list.j2'
|
||||||
dest: '/etc/apt/sources.list.d/nodesource.list'
|
dest: '/etc/apt/sources.list.d/nodesource.list'
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
when: ansible_facts['os_family'] == 'Debian'
|
when: ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
- name: create apt pinning file
|
- name: create apt pinning file
|
||||||
become: true
|
become: true
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
src: 'nodesource.j2'
|
src: 'nodesource.j2'
|
||||||
dest: '/etc/apt/preferences.d/nodesource'
|
dest: '/etc/apt/preferences.d/nodesource'
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
when: ansible_facts['os_family'] == 'Debian'
|
when: ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
- name: install front-end packages
|
- name: install front-end packages
|
||||||
become: true
|
become: true
|
||||||
|
|
|
||||||
Reference in a new issue