I deploy an Ansible playbook to some
debian:stable machines aiming to update package index cache, install
ufw and setup it in the Ansible architecture-agnostic and version-agnostic way.
- name: Update all apt package index cache (apt update) apt: update_cache=yes - name: Install a latest ufw apt: name: ufw state: latest - name: Setup firewall with ufw ufw: rule: allow port: 22,25,80,443
My difficulty here
In Bash I also regularly use
ufw --force enable but I didn't find how to add it to the playbook in Ansible-YAML syntax in Ansible ufw documentation.
How should I add
ufw --force enable correctly, if at all?