-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcockpit.yml
executable file
·134 lines (119 loc) · 2.51 KB
/
cockpit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/usr/bin/env ansible-playbook
---
- hosts: rhel_hosts,fedora_hosts
tasks:
- name: cockpit main packages
yum:
name:
- cockpit
- cockpit-ws
- cockpit-packagekit
- cockpit-storaged
- cockpit-composer
- cockpit-system
- cockpit-pcp
- cockpit-bridge
- cockpit-shell
state: latest
- name: firewalld
firewalld:
service: cockpit
state: enabled
permanent: yes
immediate: yes
- name: cockpit service socket
service:
name: cockpit.socket
state: started
enabled: true
- name: cockpit store metrics
service:
name: "{{ item }}"
state: started
enabled: true
loop:
- pmcd
- pmlogger
- name: disable_timeout
ini_file:
path: /etc/cockpit/cockpit.conf
section: Session
option: IdleTimeout
value: "0"
- hosts: rhel_hosts
tasks:
- name: cockpit on RHEL packages
yum:
name:
- subscription-manager-cockpit
- name: cockpit on RHEL8 packages
yum:
name:
- cockpit-session-recording
when: ansible_distribution_major_version|int >=8
- hosts: fedora_hosts
tasks:
- name: cockpit on Fedora packages
yum:
name:
# - cockpit-machines-ovirt
- cockpit-podman
- cockpit-session-recording
- tlog
- hosts: kvm_hosts
tasks:
- name: cockpit VM management packages
yum:
name:
- cockpit-machines
state: latest
- hosts: rhv_hosts
tasks:
- name: cockpit RHV management packages
yum:
name:
- cockpit-ovirt-dashboard
- cockpit-machines-ovirt
state: latest
- hosts: ubuntu_hosts
tasks:
- name: cockpit package
apt:
name:
- cockpit
state: latest
- hosts: sat6
name: cockpit_on_different_port
tasks:
- name: cockpit_config
copy:
src: sat6/cockpit.listen.conf
dest: /etc/systemd/system/cockpit.socket.d/
notify:
- restart_cockpit
- reload_systemd
- name: selinux_mgmt_packages
yum:
name:
- libsemanage-python
- policycoreutils-python
- name: SElinux_port_change
seport:
ports: 9091
proto: tcp
setype: websm_port_t
- name: firewalld_port
firewalld:
port: 9091/tcp
state: enabled
permanent: yes
immediate: yes
handlers:
- name: reload_systemd
systemd:
daemon_reload: yes
- name: restart_cockpit
service:
name: cockpit.socket
state: restarted
...