diff --git a/inventory.yml b/inventory.yml index 83ab9f6..2312313 100644 --- a/inventory.yml +++ b/inventory.yml @@ -5,4 +5,5 @@ all: UDMP: ansible_host: 192.168.1.1 ansible_user: root - ansible_ssh_private_key_file: ~/.ssh/id_rsa \ No newline at end of file + ansible_ssh_private_key_file: ~/.ssh/id_ed25519 + nextdns_profile_id: "e3448e" diff --git a/playbooks/config-nextdns.yml b/playbooks/config-nextdns.yml index b604d58..28a2893 100644 --- a/playbooks/config-nextdns.yml +++ b/playbooks/config-nextdns.yml @@ -1,5 +1,6 @@ - name: Install and Configure NextDNS CLI hosts: UDM + become: false gather_facts: yes tasks: @@ -12,5 +13,5 @@ - name: Download and Install NextDNS CLI ansible.builtin.shell: - cmd: printf "i\ne3448e\nY\nY\nY" |sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"' - when: nextdns_status.stdout == "" \ No newline at end of file + cmd: "printf 'i\n{{ nextdns_profile_id }}\nY\nY\nY' | sh -c 'sh -c \"$(curl -sL https://nextdns.io/install)\"'" + when: nextdns_status.stdout == ""