---
- name: setup firewall
  import_tasks: firewall.yml

- name: Install cockpit-ws
  package: name={{ item }} state=present
  with_items:
    - cockpit-ws
    - cockpit-system
    - cockpit-bridge
    - cockpit-docker
    - "{{ cockpit_plugins }}"
  when: not openshift.common.is_containerized | bool
  register: result
  until: result | success

- name: Enable cockpit-ws
  systemd:
    name: cockpit.socket
    enabled: true
    state: started
  when: not openshift.common.is_containerized | bool