update controller api to support new routes #1

Open
malarinv wants to merge 1 commits from api_v1 into master
10 changed files with 93 additions and 93 deletions

View File

@ -1,3 +1,4 @@
[TODO] Update build
[![Build Status](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier.svg?branch=master)](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier) [![GitHub issues](https://img.shields.io/github/issues/m4rcu5nl/ansible-role-zerotier.svg)](https://github.com/m4rcu5nl/ansible-role-zerotier/issues) [![Build Status](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier.svg?branch=master)](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier) [![GitHub issues](https://img.shields.io/github/issues/m4rcu5nl/ansible-role-zerotier.svg)](https://github.com/m4rcu5nl/ansible-role-zerotier/issues)
ZeroTier ZeroTier

View File

@ -1,7 +1,7 @@
--- ---
# defaults file for ansible-role-zerotier # defaults file for ansible-role-zerotier
zerotier_api_accesstoken: "{{ zerotier_accesstoken | default() }}" # For backwards compatibility zerotier_api_accesstoken: "{{ zerotier_accesstoken | default() }}" # For backwards compatibility
zerotier_api_url: https://my.zerotier.com zerotier_api_url: https://api.zerotier.com
zerotier_api_delegate: localhost zerotier_api_delegate: localhost
zerotier_apt_state: present zerotier_apt_state: present
zerotier_member_register_short_hostname: "{{ zerotier_register_short_hostname | default(false) }}" # For backwards compatibility zerotier_member_register_short_hostname: "{{ zerotier_register_short_hostname | default(false) }}" # For backwards compatibility

View File

@ -45,7 +45,7 @@ galaxy_info:
- Cosmic - Cosmic
- name: Fedora - name: Fedora
versions: versions:
- 28 - 39
# - name: SomePlatform # - name: SomePlatform
# versions: # versions:
# - all # - all
@ -63,6 +63,7 @@ galaxy_info:
# NOTE: A tag is limited to a single word comprised of alphanumeric characters. # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role. # Maximum 20 tags per role.
dependencies: [] dependencies:
[]
# List your role dependencies here, one per line. Be sure to remove the '[]' above, # List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list. # if you add dependencies to this list.

View File

@ -2,7 +2,7 @@
- block: - block:
- name: Authorize new members to network - name: Authorize new members to network
uri: uri:
url: "{{ zerotier_api_url }}/api/network/{{ zerotier_network_id }}/member/{{ ansible_local['zerotier']['node_id'] }}" url: "{{ zerotier_api_url }}/api/v1/network/{{ zerotier_network_id }}/member/{{ ansible_local['zerotier']['node_id'] }}"
method: POST method: POST
headers: headers:
Authorization: bearer {{ zerotier_api_accesstoken }} Authorization: bearer {{ zerotier_api_accesstoken }}
@ -19,7 +19,7 @@
- name: Configure members in network - name: Configure members in network
uri: uri:
url: "{{ zerotier_api_url }}/api/network/{{ zerotier_network_id }}/member/{{ ansible_local['zerotier']['node_id'] }}" url: "{{ zerotier_api_url }}/api/v1/network/{{ zerotier_network_id }}/member/{{ ansible_local['zerotier']['node_id'] }}"
method: POST method: POST
headers: headers:
Authorization: bearer {{ zerotier_api_accesstoken }} Authorization: bearer {{ zerotier_api_accesstoken }}

View File

@ -1,5 +1,4 @@
--- ---
- include_tasks: install/{{ ansible_facts['os_family'] }}.yml - include_tasks: install/{{ ansible_facts['os_family'] }}.yml
tags: tags:
- installation - installation

View File

@ -11,7 +11,6 @@
- name: Re-gather ansible_local facts - name: Re-gather ansible_local facts
setup: filter=ansible_local setup: filter=ansible_local
- import_tasks: authorize_node.yml - import_tasks: authorize_node.yml
when: when:
- zerotier_api_accesstoken | length > 0 - zerotier_api_accesstoken | length > 0