Claude 1
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="{% if item.name in existing_dhcp_servers %}update{% else %}add{% endif %}">
|
||||
<DHCPServer>
|
||||
<Name>{{ item.name }}</Name>
|
||||
<Interface>{{ item.interface }}</Interface>
|
||||
<Status>{{ 'Enable' if item.enabled | default(true) else 'Disable' }}</Status>
|
||||
<StartIPAddress>{{ item.start_ip }}</StartIPAddress>
|
||||
<EndIPAddress>{{ item.end_ip }}</EndIPAddress>
|
||||
<Netmask>{{ item.netmask }}</Netmask>
|
||||
<Gateway>{{ item.gateway }}</Gateway>
|
||||
<DNSServers>
|
||||
{% for dns in item.dns_servers %}
|
||||
<Server>{{ dns }}</Server>
|
||||
{% endfor %}
|
||||
</DNSServers>
|
||||
{% if item.domain is defined %}
|
||||
<DomainName>{{ item.domain }}</DomainName>
|
||||
{% endif %}
|
||||
<LeaseTime>{{ item.lease_time | default(86400) }}</LeaseTime>
|
||||
{% if item.reservations is defined and item.reservations | length > 0 %}
|
||||
<Reservations>
|
||||
{% for reservation in item.reservations %}
|
||||
<Reservation>
|
||||
<MACAddress>{{ reservation.mac_address }}</MACAddress>
|
||||
<IPAddress>{{ reservation.ip_address }}</IPAddress>
|
||||
<Hostname>{{ reservation.hostname | default('') }}</Hostname>
|
||||
</Reservation>
|
||||
{% endfor %}
|
||||
</Reservations>
|
||||
{% endif %}
|
||||
{% if item.dhcp_options is defined and item.dhcp_options | length > 0 %}
|
||||
<DHCPOptions>
|
||||
{% for option in item.dhcp_options %}
|
||||
<Option>
|
||||
<Code>{{ option.option }}</Code>
|
||||
<Value>{{ option.value }}</Value>
|
||||
</Option>
|
||||
{% endfor %}
|
||||
</DHCPOptions>
|
||||
{% endif %}
|
||||
</DHCPServer>
|
||||
</Set>
|
||||
</Request>
|
||||
@@ -0,0 +1,19 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="update">
|
||||
<DNS>
|
||||
<Forwarders>
|
||||
{% for forwarder in sophos_dns.forwarders %}
|
||||
<Server>{{ forwarder }}</Server>
|
||||
{% endfor %}
|
||||
</Forwarders>
|
||||
{% if sophos_dns.domain is defined %}
|
||||
<DomainName>{{ sophos_dns.domain }}</DomainName>
|
||||
{% endif %}
|
||||
<DNSForwarder>{{ 'Enable' if sophos_dns.enable_dns_forwarder | default(true) else 'Disable' }}</DNSForwarder>
|
||||
</DNS>
|
||||
</Set>
|
||||
</Request>
|
||||
@@ -0,0 +1,25 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="{% if item.name in existing_interfaces %}update{% else %}add{% endif %}">
|
||||
<Interface>
|
||||
<Name>{{ item.name }}</Name>
|
||||
<Description>{{ item.description | default('') }}</Description>
|
||||
<Zone>{{ item.zone }}</Zone>
|
||||
<Type>{{ item.type | default('physical') }}</Type>
|
||||
{% if item.mode == 'static' %}
|
||||
<IPAddress>{{ item.ip_address }}</IPAddress>
|
||||
<Netmask>{{ item.netmask }}</Netmask>
|
||||
{% if item.gateway is defined %}
|
||||
<Gateway>{{ item.gateway }}</Gateway>
|
||||
{% endif %}
|
||||
{% elif item.mode == 'dhcp' %}
|
||||
<DHCPMode>Enable</DHCPMode>
|
||||
{% endif %}
|
||||
<MTU>{{ item.mtu | default(sophos_default_mtu) }}</MTU>
|
||||
<Status>{{ 'Enable' if item.enabled | default(true) else 'Disable' }}</Status>
|
||||
</Interface>
|
||||
</Set>
|
||||
</Request>
|
||||
@@ -0,0 +1,19 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="{% if item.name in existing_routes %}update{% else %}add{% endif %}">
|
||||
<StaticRoute>
|
||||
<Name>{{ item.name }}</Name>
|
||||
<Destination>{{ item.destination }}</Destination>
|
||||
<Netmask>{{ item.netmask }}</Netmask>
|
||||
<Gateway>{{ item.gateway }}</Gateway>
|
||||
{% if item.interface is defined %}
|
||||
<Interface>{{ item.interface }}</Interface>
|
||||
{% endif %}
|
||||
<Metric>{{ item.metric | default(10) }}</Metric>
|
||||
<Status>{{ 'Enable' if item.enabled | default(true) else 'Disable' }}</Status>
|
||||
</StaticRoute>
|
||||
</Set>
|
||||
</Request>
|
||||
@@ -0,0 +1,18 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="{% if item.name in existing_vlans %}update{% else %}add{% endif %}">
|
||||
<VLANInterface>
|
||||
<Name>{{ item.name }}</Name>
|
||||
<Description>{{ item.description | default('') }}</Description>
|
||||
<VLANID>{{ item.vlan_id }}</VLANID>
|
||||
<ParentInterface>{{ item.parent_interface }}</ParentInterface>
|
||||
<Zone>{{ item.zone }}</Zone>
|
||||
<IPAddress>{{ item.ip_address }}</IPAddress>
|
||||
<Netmask>{{ item.netmask }}</Netmask>
|
||||
<Status>{{ 'Enable' if item.enabled | default(true) else 'Disable' }}</Status>
|
||||
</VLANInterface>
|
||||
</Set>
|
||||
</Request>
|
||||
Reference in New Issue
Block a user