Initial configuration
This commit is contained in:
34
roles/cockpit/tasks/main.yml
Normal file
34
roles/cockpit/tasks/main.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
- name: Install base packages
|
||||
become: true
|
||||
package:
|
||||
name:
|
||||
- cockpit
|
||||
- cockpit-bridge
|
||||
- cockpit-machines
|
||||
- cockpit-navigator
|
||||
- cockpit-packagekit
|
||||
- cockpit-podman
|
||||
- cockpit-storaged
|
||||
- cockpit-system
|
||||
- cockpit-ws
|
||||
state: present
|
||||
|
||||
- name: Enable cockpit
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: cockpit.socket
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: Copy cockpit configuration
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: cockpit.conf.j2
|
||||
dest: /etc/cockpit/cockpit.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Reboot
|
||||
become: true
|
||||
reboot:
|
||||
4
roles/cockpit/templates/cockpit.conf.j2
Normal file
4
roles/cockpit/templates/cockpit.conf.j2
Normal file
@@ -0,0 +1,4 @@
|
||||
[WebService]
|
||||
Origins = http://{{ inventory_hostname }} ws://{{ inventory_hostname }} https://{{ inventory_hostname }} wss://{{ inventory_hostname }} http://10.0.0.160 ws://10.0.0.160 https://10.0.0.160 wss://10.0.0.160
|
||||
ProtocolHeader = X-Forwarded-Proto
|
||||
AllowUnencrypted=true
|
||||
Reference in New Issue
Block a user