update controller api to support new routes

pull/1/head
Malar Invention 2024-10-07 21:54:26 +05:30
parent ca3cc077d6
commit bd13f3a938
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)
ZeroTier

View File

@ -1,7 +1,7 @@
---
# defaults file for ansible-role-zerotier
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_apt_state: present
zerotier_member_register_short_hostname: "{{ zerotier_register_short_hostname | default(false) }}" # For backwards compatibility

View File

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

View File

@ -2,7 +2,7 @@
- block:
- name: Authorize new members to network
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
headers:
Authorization: bearer {{ zerotier_api_accesstoken }}
@ -19,7 +19,7 @@
- name: Configure members in network
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
headers:
Authorization: bearer {{ zerotier_api_accesstoken }}

View File

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

View File

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