2024-07-12 15:01:52 +02:00
|
|
|
---
|
|
|
|
- name: Packages
|
|
|
|
ansible.builtin.include_tasks: install.yml
|
|
|
|
tags: install
|
|
|
|
|
|
|
|
- name: Install config to enable reverse proxy
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: templates/cockpit.conf
|
|
|
|
dest: /etc/cockpit/cockpit.conf
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
2024-07-12 21:19:42 +02:00
|
|
|
when: cockpit_has_reverse_proxy
|
2024-07-12 15:01:52 +02:00
|
|
|
|
2024-12-14 20:53:24 +01:00
|
|
|
- name: Require 2FA for logging into the Cockpit
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
line: auth required pam_google_authenticator.so nullok
|
|
|
|
path: /etc/pam.d/cockpit
|
|
|
|
create: true
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
when: cockpit_2fa
|
|
|
|
|
2024-07-12 15:01:52 +02:00
|
|
|
- name: Enable cockpit
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: "cockpit.socket"
|
|
|
|
enabled: true
|
|
|
|
state: restarted
|