check if its installed
This commit is contained in:
@@ -3,18 +3,14 @@
|
||||
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:
|
||||
- 'Choice (default=i):' : 'i'
|
||||
- 'NextDNS Profile ID (default=e3448e):' : 'e3448e'
|
||||
- 'Report device name? [Y|n]:' : 'Y'
|
||||
- 'Enable caching? [Y|n]:' : 'Y'
|
||||
- 'Enable instant refresh? (y/n):' : 'Y'
|
||||
- name: Check if NextDNS is installed
|
||||
ansible.builtin.shell: apt list --installed | grep nextdns
|
||||
register: nextdns_status
|
||||
ignore_errors: True
|
||||
check_mode: False
|
||||
changed_when: False
|
||||
|
||||
- name: Start NextDNS CLI
|
||||
ansible.builtin.command:
|
||||
cmd: nextdns start
|
||||
ignore_errors: yes
|
||||
- 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.rc == 0
|
||||
Reference in New Issue
Block a user