An Ansible role for managing firewall rules on the Cloud in an agnostic cloud provider way.

Clone this repo:

Branches

  1. 34bb17e Use inventory/hosts to run tests by Yanis Guenane · 4 years, 7 months ago master
  2. f01048d Add LICENSE + state notion by Yanis Guenane · 4 years, 7 months ago
  3. 393d91d Adding README.md + meta/ by Yanis Guenane · 4 years, 7 months ago
  4. a57dee7 Initial commit by Yanis Guenane · 4 years, 7 months ago
  5. dd7572a ManageSF commit by admin · 4 years, 7 months ago

Ansible Cloud: Firewall Rule role

An Ansible role for managing firewall rules on the Cloud in an agnostic cloud provider way.

This role is part of the ansible-cloud broader effort.

Pre-requisites

Please refer to ansible-cloud README.md to see how to configure your system the proper way for the provide you wish to use.

Role Variables

Variable nameRequiredDefaultTypeDescription
cloud_firewallrule_group_nameTrueN/AStringName of the security group
cloud_firewallrule_protocolTrueN/AStringProtocol to use for the rule
cloud_firewallrule_start_portTrueN/AintStarting port range
cloud_firewallrule_end_portTrueN/AintEnding port range
cloud_firewallrule_remote_cidrTrueN/AStringRemote CIDR range
cloud_firewallrule_stateFalsepresentStringShould the rule be present

Example

---
- hosts: localhost
  vars:
    ansible_cloud_provider: vultr
  tasks:
    - name: Create firewall rule
      include_role:
        name: cloud-firewallrule
      vars:
        cloud_firewallrule_group_name: ansiblecloud-testsecuritygroup
        cloud_firewallrule_protocol: tcp
        cloud_firewallrule_start_port: 80
        cloud_firewallrule_end_port: 81
        cloud_firewallrule_remote_cidr: 0.0.0.0/0

License

Apache 2.0

Authors Information