diff --git a/roles/cockpit/files/10-globally-managed-devices.conf b/roles/cockpit/files/10-globally-managed-devices.conf new file mode 100644 index 0000000..970ba08 --- /dev/null +++ b/roles/cockpit/files/10-globally-managed-devices.conf @@ -0,0 +1,2 @@ +[keyfile] +unmanaged-devices=none diff --git a/roles/cockpit/tasks/main.yml b/roles/cockpit/tasks/main.yml index 4abaaa8..a1dc0ad 100644 --- a/roles/cockpit/tasks/main.yml +++ b/roles/cockpit/tasks/main.yml @@ -30,6 +30,20 @@ group: root mode: 0644 +# https://cockpit-project.org/faq.html#error-message-about-being-offline +- name: Allow NetworkManager to manage network interfaces + become_user: root + become: true + ansible.builtin.copy: + src: files/10-globally-managed-devices.conf + dest: /etc/NetworkManager/conf.d/ + owner: root + group: root + mode: "0644" + +- name: Set-up a dummy network interface faking internet connection + ansible.builtin.command: "nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1" + - name: Permit traffic from any IP to cockpit socket become: true community.general.ufw: