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.
pull/12/head
Barry Flanagan 2018-02-04 22:31:33 +00:00 committed by GitHub
parent 5ab3e67331
commit 054d554a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -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