---

argument_specs:

  main:
    version_added: "0.0.1"
    short_description: Configure a MTA-STS policy file.
    description:
      - Configure a L(MTA-STS,https://datatracker.ietf.org/doc/html/rfc8461) policy file.
      - "Execution of this role can be limited using the following tags:"
      - "C(role::mtasts:config): Create the MTA-STS policy file"
      - "C(role::mtasts): Apply all of the above."
    author: s3lph
    options:
      mtasts_policyfile_name:
        description:
          - Path of the MTA-STS policy file to create.
        type: str
        default: /var/www/html/.well-known/mta-sts.txt
      mtasts_policyfile_owner:
        description:
          - Owner of the MTA-STS policy file.
        type: str
        default: www-data
      mtasts_policyfile_group:
        description:
          - Group of the MTA-STS policy file.
        type: str
        default: www-data
      mtasts_mode:
        description:
          - One of C(enforce), C(testing), or C(none)
          - Indicating the expected behavior of a Sending MTA in the case of a policy validation failure.
        type: str
        default: testing
      mtasts_mxs:
        description:
          - One or more patterns matching allowed MX hosts for the Policy Domain.
        type: list
        elements: str
        default: ["{{ ansible_facts.fqdn }}"]
      mtasts_maxage:
        description:
          - Max lifetime of the policy.
          - Well-behaved clients SHOULD cache a policy for up to this value from the last policy fetch time.
        type: int
        default: 604800