Initial commit

This commit is contained in:
2023-12-27 11:42:24 -05:00
parent 4508421892
commit 528c810c69
4 changed files with 55 additions and 1 deletions
+22 -1
View File
@@ -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
``````
+4
View File
@@ -0,0 +1,4 @@
[defaults]
inventory = ./inventory.yml
host_key_checking = False
#vault_password_file = ./.password_file
+8
View 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
+21
View File
@@ -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