driver:
  name: vagrant

provisioner:
  name: chef_infra
  product_name: chef
  product_version: <%= ENV['CHEF_VERSION'] %>
  deprecations_as_errors: true
  chef_license: accept-no-persist
  attributes:
    firewall:
      allow_ssh: true
      allow_winrm: true
      allow_mosh: true
      allow_loopback: true
      allow_icmp: true
      firewalld:
        permanent: true

verifier:
  name: inspec

platforms:
  - name: almalinux-8
  - name: amazonlinux-2
  - name: centos-7
  - name: centos-stream-8
  - name: debian-9
  - name: debian-10
  - name: debian-11
  - name: fedora-34
  - name: fedora-latest
  - name: freebsd-11
  - name: freebsd-12
  - name: opensuse-leap-15
  - name: oracle-8
  - name: ubuntu-18.04
  - name: ubuntu-20.04
  - name: windows-2016
    driver_config:
      box: tas50/windows_2016
  - name: windows-2019
    driver_config:
      box: tas50/windows_2019

suites:
  - name: default
    run_list:
      - recipe[firewall::default]
      - recipe[firewall-test::default]

  - name: firewalld
    excludes:
      - almalinux-8
      - centos-8
      - debian-9
      - debian-10
      - oracle-8
      - ubuntu-18.04
      - ubuntu-20.04
      - windows-2016
      - windows-2019
    run_list:
      - recipe[firewall::default]
      - recipe[firewall-test::default]

  - name: ufw
    excludes:
      - almalinux-8
      - amazonlinux-2
      - centos-7
      - centos-8
      - fedora-latest
      - freebsd-11
      - freebsd-12
      - opensuse-leap-15
      - oracle-8
      - windows-2016
      - windows-2019
    run_list:
      - recipe[firewall::default]
      - recipe[firewall-test::default]

  - name: iptables
    excludes:
      - debian-9
      - debian-10
      - oracle-8
      - ubuntu-18.04
      - ubuntu-20.04
      - windows-2016
      - windows-2019
    run_list:
      - recipe[firewall::default]
      - recipe[firewall-test::default]
    attributes:
      firewall:
        ubuntu_iptables: true
        redhat7_iptables: true

  - name: nftables
    includes:
      - debian-11
      - oracle-8
    run_list:
      - recipe[nftables-test]

  - name: firewalld-dbus
    includes:
      - debian-11
      - fedora-34
    run_list:
      - recipe[firewalld-test]

  - name: windows
    includes:
      - windows-2016
      - windows-2019
    run_list:
      - recipe[firewall::default]
      - recipe[firewall-test::default]
