chef-recipes/roles/cockpit/tasks/main.yml

45 lines
864 B
YAML
Raw Normal View History

2023-02-07 13:02:43 +00:00
# code: language=ansible
2023-02-01 17:34:56 +00:00
- name: Install base packages
become: true
2023-02-06 09:11:03 +00:00
ansible.builtin.package:
2023-02-01 17:34:56 +00:00
name:
- cockpit
- cockpit-bridge
- cockpit-machines
- cockpit-packagekit
- cockpit-podman
- cockpit-storaged
- cockpit-system
- cockpit-ws
state: present
- name: Enable cockpit
become: true
ansible.builtin.systemd:
name: cockpit.socket
2023-02-06 09:11:03 +00:00
enabled: true
2023-02-01 17:34:56 +00:00
state: started
2023-02-06 09:11:03 +00:00
- name: Copy cockpit configuration
2023-02-01 17:34:56 +00:00
become: true
ansible.builtin.template:
src: cockpit.conf.j2
dest: /etc/cockpit/cockpit.conf
owner: root
group: root
mode: 0644
2023-02-15 13:01:28 +00:00
- name: Permit traffic from any IP to cockpit socket
become: true
community.general.ufw:
direction: in
from_ip: any
proto: tcp
to_port: 9090
rule: allow
2023-02-06 09:11:03 +00:00
# - name: Reboot
# become: true
# ansible.builtin.reboot: