Add installation tasks

Add Zerotier repo and it's pgp key. Install zerotier-one.
pull/2/head
Marcus Meurs 2017-07-27 00:23:20 +02:00
parent b741c27428
commit cddaf793e8
2 changed files with 45 additions and 1 deletions

43
tasks/install.yml Normal file
View File

@ -0,0 +1,43 @@
---
- block: # Add zerotier repo and it's gpg key
- name: Add zerotier gpg key
rpm_key:
state: present
key: https://download.zerotier.com/contact%40zerotier.com.gpg
- name: Add zerotier repo
yum_repository:
name: zerotier
description: ZeroTier, Inc. RPM Release Repository
baseurl: https://download.zerotier.com/redhat/el/$releasever
gpgcheck: yes
enabled: yes
register: zerotier_repo
tags:
- installation
- repositories
- block: #Install and enable zerotier-one
- name: Install zerotier-one
package:
name: zerotier-one
state: present
register: zerotier_client
notify:
- start zerotier-one
- enable zerotier-one
# - name: Start and enable zerotier-one service
# service:
# name: zerotier-one
# state: restarted
# enabled: yes
# when:
# - zerotier_client|changed
when:
- zerotier_repo|succeeded
tags:
- installation
- packages

View File

@ -1,2 +1,3 @@
---
# tasks file for ansible-role-zerotier
# tasks file for ansible-role-zerotier
- include: install.yml