Initial commit
This commit is contained in:
@@ -1,2 +1,23 @@
|
|||||||
# Unifi-NextDNS
|
# Unifi-NextDNS: Automated with Ansible
|
||||||
|
|
||||||
|
This repo servers to install/reinstall NextDNS CLI on the UDMP
|
||||||
|
|
||||||
|
### Pre Requisites
|
||||||
|
|
||||||
|
SSH key based authentication must be setup to the UDM.
|
||||||
|
|
||||||
|
### To Use These Playbooks
|
||||||
|
|
||||||
|
Simply clone this repository and follow the readme below.
|
||||||
|
|
||||||
|
### File structure:
|
||||||
|
|
||||||
|
``````
|
||||||
|
├── ansible.cfg
|
||||||
|
├── inventory.yml
|
||||||
|
└── playbooks
|
||||||
|
├── config-nextdns.yml
|
||||||
|
|
||||||
|
``````
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[defaults]
|
||||||
|
inventory = ./inventory.yml
|
||||||
|
host_key_checking = False
|
||||||
|
#vault_password_file = ./.password_file
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
all:
|
||||||
|
children:
|
||||||
|
UDM:
|
||||||
|
hosts:
|
||||||
|
UDMP:
|
||||||
|
ansible_host: 192.168.1.1
|
||||||
|
ansible_user: root
|
||||||
|
ansible_ssh_private_key_file: ~/.ssh/id_rsa
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
- name: Install and Configure NextDNS CLI
|
||||||
|
hosts: UDM
|
||||||
|
gather_facts: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Download and install NextDNS CLI
|
||||||
|
ansible.builtin.expect:
|
||||||
|
command: sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'
|
||||||
|
responses:
|
||||||
|
Question:
|
||||||
|
- i
|
||||||
|
- e3448e
|
||||||
|
- Y
|
||||||
|
- Y
|
||||||
|
- Y
|
||||||
|
|
||||||
|
- name: Start NextDNS CLI
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: nextdns start
|
||||||
|
ignore_errors: yes
|
||||||
Reference in New Issue
Block a user