ansible-cockpit/tasks/main.yml

28 lines
690 B
YAML
Raw Normal View History

2016-04-26 21:12:24 +02:00
---
# tasks file for bvansomeren.cockpit
- name: ensure cockpit is installed
2018-08-22 21:40:45 +02:00
package:
name: "{{ item }}"
state: present
loop: "{{ cockpit_packages }}"
2016-04-26 21:12:24 +02:00
- 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
2018-11-22 19:05:37 +01:00
- name: enable firewall
firewalld:
service: cockpit
permanent: true
immediate: true
state: enabled
2016-04-26 21:12:24 +02:00
- 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