29 lines
741 B
YAML
29 lines
741 B
YAML
---
|
|
# tasks file for bvansomeren.cockpit
|
|
|
|
- name: ensure cockpit is installed
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop: "{{ cockpit_packages }}"
|
|
|
|
- name: disable cockpit internal TLS
|
|
ini_file: dest=/usr/lib/systemd/system/cockpit.service section=Service option=ExecStart value="/usr/libexec/cockpit-ws --no-tls"
|
|
register: systemd
|
|
when: cockpit_disable_tls
|
|
|
|
- name: enable firewall
|
|
firewalld:
|
|
port: "{{ cockpit_listen_port }}/tcp"
|
|
permanent: true
|
|
immediate: true
|
|
state: enabled
|
|
when: cockpit_use_firewalld
|
|
|
|
- name: reload systemd if unit file changed
|
|
command: systemctl daemon-reload
|
|
when: systemd.changed
|
|
|
|
- name: ensure Cockpit is started
|
|
service: name=cockpit state=started enabled=yes
|