aboutsummaryrefslogtreecommitdiff
path: root/host.yml
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2023-09-02 22:57:44 -0400
committerspmfox <spmfox@foxwd.com>2023-09-02 22:57:44 -0400
commit333fa8fa65557064f36b5fcb390d1a076388473d (patch)
treea41486a04b76e3af2ec927bb3bb70bd319bacc7b /host.yml
parente211b73fa328fb7a82fd1bcb2116d9f9aa923094 (diff)
initial
Diffstat (limited to 'host.yml')
-rw-r--r--host.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/host.yml b/host.yml
index b15d9e0..db28e96 100644
--- a/host.yml
+++ b/host.yml
@@ -42,3 +42,22 @@
tags:
- never
- unprivileged-ports
+
+ - name: cPanel DNS-only block
+ block:
+ - name: Confirm if cpsrvd is not listening on http ports
+ ansible.builtin.shell: "whmapi1 get_tweaksetting key='disable_cphttpd' |grep 'value: 1' || /bin/true"
+ register: cpsrv_listen
+
+ - name: Turn off cpsrvd listening on http ports (if necessary)
+ ansible.builtin.shell: "whmapi1 set_tweaksetting key='disable_cphttpd' value='1' ; /scripts/restartsrv_cpsrvd"
+ when: cpsrv_listen.stdout | length == 0
+
+ - name: Turn off firewalld
+ ansible.builtin.service:
+ name: "firewalld"
+ state: stopped
+ enabled: false
+ tags:
+ - never
+ - cpanel-dnsonly