Update install.yml to fix fresh Debian install.
Fresh install was failing if the zerotier repo did not exist. Changed the initial check to check the existence of the zerotier repo file.
This commit is contained in:
@@ -23,17 +23,15 @@
|
|||||||
# Debian variants
|
# Debian variants
|
||||||
- block: # Add zerotier repo and it's gpg key if not already done.
|
- block: # Add zerotier repo and it's gpg key if not already done.
|
||||||
- name: Check if zerotier is already installed
|
- name: Check if zerotier is already installed
|
||||||
package:
|
stat:
|
||||||
name: zerotier-one
|
path: /etc/apt/sources.list.d/zerotier.list
|
||||||
state: present
|
|
||||||
check_mode: true
|
|
||||||
register: zerotier_repo
|
register: zerotier_repo
|
||||||
|
|
||||||
- name: Install zerotier
|
- name: Install zerotier
|
||||||
shell: curl -s 'https://pgp.mit.edu/pks/lookup?op=get&search=0x1657198823E52A61' | gpg --import && \
|
shell: curl -s 'https://pgp.mit.edu/pks/lookup?op=get&search=0x1657198823E52A61' | gpg --import && \
|
||||||
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi
|
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi
|
||||||
register: zerotier_repo
|
register: zerotier_repo
|
||||||
when: zerotier_repo.changed
|
when: zerotier_repo.stat.exists == False
|
||||||
tags:
|
tags:
|
||||||
- installation
|
- installation
|
||||||
- repositories
|
- repositories
|
||||||
|
|||||||
Reference in New Issue
Block a user