aboutsummaryrefslogtreecommitdiff
path: root/roles/host/tasks/cpanel-dnsonly.yml
blob: 27b00fedc9d7350f3c51ae5a1e41e78c34680b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- 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

- name: Create new tmp directory for podman
  ansible.builtin.file:
    path: "/var/containers/tmp"
    owner: "{{ host_containers_user }}"
    group: "{{ host_containers_user }}"
    state: directory

- name: Configure podman to use new tmp directory
  ansible.builtin.blockinfile:
    path: "/etc/containers/containers.conf"
    create: true
    block: |
      [engine]
      env = ["TMPDIR=/var/containers/tmp"]