示例#1
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        is_sub_domain=dict(type="bool"),
        tags=dict(type="list"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(
        argument_spec=argument_spec, supports_check_mode=True
    )
    api_call_object = "dns-domain"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        position=dict(type='str'),
        layer=dict(type='str'),
        name=dict(type='str', required=True),
        action=dict(type='str'),
        destination=dict(type='list'),
        destination_negate=dict(type='bool'),
        enabled=dict(type='bool'),
        install_on=dict(type='list'),
        protected_scope=dict(type='list'),
        protected_scope_negate=dict(type='bool'),
        service=dict(type='list'),
        service_negate=dict(type='bool'),
        source=dict(type='list'),
        source_negate=dict(type='bool'),
        track=dict(type='str'),
        track_settings=dict(type='dict',
                            options=dict(packet_capture=dict(type='bool'))),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'threat-rule'

    if module.params['position'] is None:
        result = api_call(module, api_call_object)
    else:
        result = api_call_for_rule(module, api_call_object)

    module.exit_json(**result)
示例#3
0
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        add_default_rule=dict(type='bool'),
        applications_and_url_filtering=dict(type='bool'),
        content_awareness=dict(type='bool'),
        detect_using_x_forward_for=dict(type='bool'),
        firewall=dict(type='bool'),
        implicit_cleanup_action=dict(type='str', choices=['drop', 'accept']),
        mobile_access=dict(type='bool'),
        shared=dict(type='bool'),
        tags=dict(type='list'),
        color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
                                        'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
                                        'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green',
                                        'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna',
                                        'yellow']),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool')
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
    api_call_object = 'access-layer'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#4
0
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        applied_profile=dict(type='str'),
        applied_threat_rules=dict(type='dict', options=dict(
            add=dict(type='list', options=dict(
                layer=dict(type='str'),
                name=dict(type='str'),
                rule_number=dict(type='str'),
                position=dict(type='str')
            ))
        )),
        apply_on=dict(type='str', choices=['all-threat-rules', 'all-threat-rules-with-specific-profile', 'manually-select-threat-rules']),
        tags=dict(type='list'),
        color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
                                        'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
                                        'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green',
                                        'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna',
                                        'yellow']),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool')
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
    api_call_object = 'exception-group'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        description=dict(type='str'),
        tags=dict(type='list'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'application-site-category'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        end=dict(type='dict', options=dict(
            date=dict(type='str'),
            iso_8601=dict(type='str'),
            posix=dict(type='int'),
            time=dict(type='str')
        )),
        end_never=dict(type='bool'),
        hours_ranges=dict(type='list', options=dict(
            enabled=dict(type='bool'),
            index=dict(type='int'),
            to=dict(type='str')
        )),
        start=dict(type='dict', options=dict(
            date=dict(type='str'),
            iso_8601=dict(type='str'),
            posix=dict(type='int'),
            time=dict(type='str')
        )),
        start_now=dict(type='bool'),
        tags=dict(type='list'),
        recurrence=dict(type='dict', options=dict(
            days=dict(type='list'),
            month=dict(type='str'),
            pattern=dict(type='str'),
            weekdays=dict(type='list')
        )),
        color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
                                        'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
                                        'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green',
                                        'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna',
                                        'yellow']),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool')
    )
    argument_spec['hours_ranges']['options']['from'] = dict(type='str')
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
    api_call_object = 'time'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        subnet=dict(type='str'),
        subnet4=dict(type='str'),
        subnet6=dict(type='str'),
        mask_length=dict(type='int'),
        mask_length4=dict(type='int'),
        mask_length6=dict(type='int'),
        subnet_mask=dict(type='str'),
        nat_settings=dict(
            type='dict',
            options=dict(auto_rule=dict(type='bool'),
                         ip_address=dict(type='str'),
                         ipv4_address=dict(type='str'),
                         ipv6_address=dict(type='str'),
                         hide_behind=dict(type='str',
                                          choices=['gateway', 'ip-address']),
                         install_on=dict(type='str'),
                         method=dict(type='str', choices=['hide', 'static']))),
        tags=dict(type='list'),
        broadcast=dict(type='str', choices=['disallow', 'allow']),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'network'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        accept_replies=dict(type='bool'),
        aggressive_aging=dict(type='dict',
                              options=dict(
                                  default_timeout=dict(type='int'),
                                  enable=dict(type='bool'),
                                  timeout=dict(type='int'),
                                  use_default_timeout=dict(type='bool'))),
        keep_connections_open_after_policy_installation=dict(type='bool'),
        match_by_protocol_signature=dict(type='bool'),
        match_for_any=dict(type='bool'),
        override_default_settings=dict(type='bool'),
        port=dict(type='str'),
        protocol=dict(type='str'),
        session_timeout=dict(type='int'),
        source_port=dict(type='str'),
        sync_connections_on_cluster=dict(type='bool'),
        tags=dict(type='list'),
        use_default_session_timeout=dict(type='bool'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'service-udp'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#9
0
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        authentication_method=dict(type='str',
                                   choices=[
                                       'undefined', 'check point password',
                                       'os password', 'securid', 'radius',
                                       'tacacs', 'ad authentication'
                                   ]),
        email=dict(type='str'),
        expiration_date=dict(type='str'),
        multi_domain_profile=dict(type='str'),
        must_change_password=dict(type='bool'),
        password=dict(type='str'),
        password_hash=dict(type='str'),
        permissions_profile=dict(type='list',
                                 options=dict(profile=dict(type='str'))),
        phone_number=dict(type='str'),
        radius_server=dict(type='str'),
        tacacs_server=dict(type='str'),
        tags=dict(type='list'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'administrator'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#10
0
def main():
    argument_spec = dict(dependent_domain=dict(type='str'),
                         global_access_policy=dict(type='str'),
                         global_domain=dict(type='str'),
                         global_threat_prevention_policy=dict(type='str'),
                         manage_protection_actions=dict(type='bool'),
                         details_level=dict(
                             type='str', choices=['uid', 'standard', 'full']),
                         ignore_warnings=dict(type='bool'),
                         ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'global-assignment'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        access=dict(type='bool'),
        desktop_security=dict(type='bool'),
        installation_targets=dict(type='list'),
        qos=dict(type='bool'),
        qos_policy_type=dict(type='str', choices=['recommended', 'express']),
        tags=dict(type='list'),
        threat_prevention=dict(type='bool'),
        vpn_traditional_mode=dict(type='bool'),
        color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
                                        'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
                                        'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green',
                                        'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna',
                                        'yellow']),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'),
        access_layers=dict(type='dict', options=dict(
            add=dict(type='list', options=dict(
                name=dict(type='str'),
                position=dict(type='int')
            )),
            remove=dict(type='list'),
            value=dict(type='list')
        )),
        threat_layers=dict(type='dict', options=dict(
            add=dict(type='list', options=dict(
                name=dict(type='str'),
                position=dict(type='int')
            )),
            remove=dict(type='list'),
            value=dict(type='list')
        ))
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
    api_call_object = 'package'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        position=dict(type="str"),
        exception_group_uid=dict(type="str"),
        exception_group_name=dict(type="str"),
        layer=dict(type="str"),
        rule_name=dict(type="str"),
        action=dict(type="str"),
        destination=dict(type="list"),
        destination_negate=dict(type="bool"),
        enabled=dict(type="bool"),
        install_on=dict(type="list"),
        protected_scope=dict(type="list"),
        protected_scope_negate=dict(type="bool"),
        protection_or_site=dict(type="list"),
        service=dict(type="list"),
        service_negate=dict(type="bool"),
        source=dict(type="list"),
        source_negate=dict(type="bool"),
        track=dict(type="str"),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "threat-exception"

    if module.params["position"] is None:
        result = api_call(module, api_call_object)
    else:
        result = api_call_for_rule(module, api_call_object)

    module.exit_json(**result)
示例#13
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        access=dict(type="bool"),
        desktop_security=dict(type="bool"),
        installation_targets=dict(type="list"),
        qos=dict(type="bool"),
        qos_policy_type=dict(type="str", choices=["recommended", "express"]),
        tags=dict(type="list"),
        threat_prevention=dict(type="bool"),
        vpn_traditional_mode=dict(type="bool"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
        access_layers=dict(
            type="dict",
            options=dict(
                add=dict(
                    type="list",
                    options=dict(name=dict(type="str"),
                                 position=dict(type="int")),
                ),
                remove=dict(type="list"),
                value=dict(type="list"),
            ),
        ),
        threat_layers=dict(
            type="dict",
            options=dict(
                add=dict(
                    type="list",
                    options=dict(name=dict(type="str"),
                                 position=dict(type="int")),
                ),
                remove=dict(type="list"),
                value=dict(type="list"),
            ),
        ),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "package"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        layer=dict(type='str'),
        position=dict(type='str'),
        name=dict(type='str', required=True),
        action=dict(type='str'),
        action_settings=dict(
            type='dict',
            options=dict(enable_identity_captive_portal=dict(type='bool'),
                         limit=dict(type='str'))),
        content=dict(type='list'),
        content_direction=dict(type='str', choices=['any', 'up', 'down']),
        content_negate=dict(type='bool'),
        custom_fields=dict(type='dict',
                           options=dict(field_1=dict(type='str'),
                                        field_2=dict(type='str'),
                                        field_3=dict(type='str'))),
        destination=dict(type='list'),
        destination_negate=dict(type='bool'),
        enabled=dict(type='bool'),
        inline_layer=dict(type='str'),
        install_on=dict(type='list'),
        service=dict(type='list'),
        service_negate=dict(type='bool'),
        source=dict(type='list'),
        source_negate=dict(type='bool'),
        time=dict(type='list'),
        track=dict(type='dict',
                   options=dict(accounting=dict(type='bool'),
                                alert=dict(type='str',
                                           choices=[
                                               'none', 'alert', 'snmp', 'mail',
                                               'user alert 1', 'user alert 2',
                                               'user alert 3'
                                           ]),
                                enable_firewall_session=dict(type='bool'),
                                per_connection=dict(type='bool'),
                                per_session=dict(type='bool'),
                                type=dict(type='str'))),
        user_check=dict(type='dict',
                        options=dict(
                            confirm=dict(type='str',
                                         choices=[
                                             'per rule', 'per category',
                                             'per application/site',
                                             'per data type'
                                         ]),
                            custom_frequency=dict(
                                type='dict',
                                options=dict(every=dict(type='int'),
                                             unit=dict(type='str',
                                                       choices=[
                                                           'hours', 'days',
                                                           'weeks', 'months'
                                                       ]))),
                            frequency=dict(type='str',
                                           choices=[
                                               'once a day', 'once a week',
                                               'once a month',
                                               'custom frequency...'
                                           ]),
                            interaction=dict(type='str'))),
        vpn=dict(type='list',
                 options=dict(community=dict(type='list'),
                              directional=dict(
                                  type='list',
                                  options=dict(to=dict(type='str'))))),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec['vpn']['options']['directional']['options']['from'] = dict(
        type='str')
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'access-rule'

    if module.params['action'] is None and module.params['position'] is None:
        result = api_call(module, api_call_object)
    else:
        result = api_call_for_rule(module, api_call_object)

    module.exit_json(**result)
示例#15
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        primary_category=dict(type="str"),
        url_list=dict(type="list"),
        application_signature=dict(type="str"),
        additional_categories=dict(type="list"),
        description=dict(type="str"),
        tags=dict(type="list"),
        urls_defined_as_regular_expression=dict(type="bool"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "application-site"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        center_gateways=dict(type='list'),
        encryption_method=dict(type='str',
                               choices=[
                                   'prefer ikev2 but support ikev1',
                                   'ikev2 only',
                                   'ikev1 for ipv4 and ikev2 for ipv6 only'
                               ]),
        encryption_suite=dict(type='str',
                              choices=[
                                  'suite-b-gcm-256', 'custom', 'vpn b',
                                  'vpn a', 'suite-b-gcm-128'
                              ]),
        ike_phase_1=dict(
            type='dict',
            options=dict(data_integrity=dict(
                type='str',
                choices=['aes-xcbc', 'sha1', 'sha256', 'sha384', 'md5']),
                         diffie_hellman_group=dict(type='str',
                                                   choices=[
                                                       'group-1', 'group-2',
                                                       'group-5', 'group-14',
                                                       'group-19', 'group-20'
                                                   ]),
                         encryption_algorithm=dict(type='str',
                                                   choices=[
                                                       'cast', 'aes-256',
                                                       'des', 'aes-128', '3des'
                                                   ]))),
        ike_phase_2=dict(
            type='dict',
            options=dict(data_integrity=dict(
                type='str',
                choices=['aes-xcbc', 'sha1', 'sha256', 'sha384', 'md5']),
                         encryption_algorithm=dict(type='str',
                                                   choices=[
                                                       'cast', 'aes-gcm-256',
                                                       'cast-40', 'aes-256',
                                                       'des', 'aes-128',
                                                       '3des', 'des-40cp',
                                                       'aes-gcm-128', 'none'
                                                   ]))),
        mesh_center_gateways=dict(type='bool'),
        satellite_gateways=dict(type='list'),
        shared_secrets=dict(type='list',
                            options=dict(external_gateway=dict(type='str'),
                                         shared_secret=dict(type='str'))),
        tags=dict(type='list'),
        use_shared_secret=dict(type='bool'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'vpn-community-star'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#17
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        center_gateways=dict(type="list"),
        encryption_method=dict(
            type="str",
            choices=[
                "prefer ikev2 but support ikev1",
                "ikev2 only",
                "ikev1 for ipv4 and ikev2 for ipv6 only",
            ],
        ),
        encryption_suite=dict(
            type="str",
            choices=[
                "suite-b-gcm-256",
                "custom",
                "vpn b",
                "vpn a",
                "suite-b-gcm-128",
            ],
        ),
        ike_phase_1=dict(
            type="dict",
            options=dict(
                data_integrity=dict(
                    type="str",
                    choices=["aes-xcbc", "sha1", "sha256", "sha384", "md5"],
                ),
                diffie_hellman_group=dict(
                    type="str",
                    choices=[
                        "group-1",
                        "group-2",
                        "group-5",
                        "group-14",
                        "group-19",
                        "group-20",
                    ],
                ),
                encryption_algorithm=dict(
                    type="str",
                    choices=["cast", "aes-256", "des", "aes-128", "3des"],
                ),
            ),
        ),
        ike_phase_2=dict(
            type="dict",
            options=dict(
                data_integrity=dict(
                    type="str",
                    choices=["aes-xcbc", "sha1", "sha256", "sha384", "md5"],
                ),
                encryption_algorithm=dict(
                    type="str",
                    choices=[
                        "cast",
                        "aes-gcm-256",
                        "cast-40",
                        "aes-256",
                        "des",
                        "aes-128",
                        "3des",
                        "des-40cp",
                        "aes-gcm-128",
                        "none",
                    ],
                ),
            ),
        ),
        mesh_center_gateways=dict(type="bool"),
        satellite_gateways=dict(type="list"),
        shared_secrets=dict(
            type="list",
            options=dict(
                external_gateway=dict(type="str"),
                shared_secret=dict(type="str"),
            ),
        ),
        tags=dict(type="list"),
        use_shared_secret=dict(type="bool"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "vpn-community-star"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#18
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        accept_replies=dict(type="bool"),
        action=dict(type="str"),
        aggressive_aging=dict(
            type="dict",
            options=dict(
                default_timeout=dict(type="int"),
                enable=dict(type="bool"),
                timeout=dict(type="int"),
                use_default_timeout=dict(type="bool"),
            ),
        ),
        ip_protocol=dict(type="int"),
        keep_connections_open_after_policy_installation=dict(type="bool"),
        match=dict(type="str"),
        match_for_any=dict(type="bool"),
        override_default_settings=dict(type="bool"),
        session_timeout=dict(type="int"),
        sync_connections_on_cluster=dict(type="bool"),
        tags=dict(type="list"),
        use_default_session_timeout=dict(type="bool"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "service-other"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#19
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        ip_address=dict(type="str"),
        ipv4_address=dict(type="str"),
        ipv6_address=dict(type="str"),
        interfaces=dict(
            type="list",
            options=dict(
                name=dict(type="str"),
                subnet=dict(type="str"),
                subnet4=dict(type="str"),
                subnet6=dict(type="str"),
                mask_length=dict(type="int"),
                mask_length4=dict(type="int"),
                mask_length6=dict(type="int"),
                subnet_mask=dict(type="str"),
                color=dict(
                    type="str",
                    choices=[
                        "aquamarine",
                        "black",
                        "blue",
                        "crete blue",
                        "burlywood",
                        "cyan",
                        "dark green",
                        "khaki",
                        "orchid",
                        "dark orange",
                        "dark sea green",
                        "pink",
                        "turquoise",
                        "dark blue",
                        "firebrick",
                        "brown",
                        "forest green",
                        "gold",
                        "dark gold",
                        "gray",
                        "dark gray",
                        "light green",
                        "lemon chiffon",
                        "coral",
                        "sea green",
                        "sky blue",
                        "magenta",
                        "purple",
                        "slate blue",
                        "violet red",
                        "navy blue",
                        "olive",
                        "orange",
                        "red",
                        "sienna",
                        "yellow",
                    ],
                ),
                comments=dict(type="str"),
                details_level=dict(type="str",
                                   choices=["uid", "standard", "full"]),
                ignore_warnings=dict(type="bool"),
                ignore_errors=dict(type="bool"),
            ),
        ),
        nat_settings=dict(
            type="dict",
            options=dict(
                auto_rule=dict(type="bool"),
                ip_address=dict(type="str"),
                ipv4_address=dict(type="str"),
                ipv6_address=dict(type="str"),
                hide_behind=dict(type="str", choices=["gateway",
                                                      "ip-address"]),
                install_on=dict(type="str"),
                method=dict(type="str", choices=["hide", "static"]),
            ),
        ),
        tags=dict(type="list"),
        host_servers=dict(
            type="dict",
            options=dict(
                dns_server=dict(type="bool"),
                mail_server=dict(type="bool"),
                web_server=dict(type="bool"),
                web_server_config=dict(
                    type="dict",
                    options=dict(
                        additional_ports=dict(type="list"),
                        application_engines=dict(type="list"),
                        listen_standard_port=dict(type="bool"),
                        operating_system=dict(
                            type="str",
                            choices=[
                                "sparc linux",
                                "windows",
                                "other",
                                "x86 linux",
                                "sparc solaris",
                            ],
                        ),
                        protected_by=dict(type="str"),
                    ),
                ),
            ),
        ),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "host"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#20
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        active_protections_performance_impact=dict(
            type="str", choices=["high", "medium", "low", "very_low"]),
        active_protections_severity=dict(
            type="str",
            choices=["Critical", "High", "Medium or above", "Low or above"],
        ),
        confidence_level_high=dict(
            type="str", choices=["Inactive", "Ask", "Prevent", "Detect"]),
        confidence_level_low=dict(
            type="str", choices=["Inactive", "Ask", "Prevent", "Detect"]),
        confidence_level_medium=dict(
            type="str", choices=["Inactive", "Ask", "Prevent", "Detect"]),
        indicator_overrides=dict(
            type="list",
            options=dict(
                action=dict(
                    type="str",
                    choices=["Inactive", "Ask", "Prevent", "Detect"],
                ),
                indicator=dict(type="str"),
            ),
        ),
        ips_settings=dict(
            type="dict",
            options=dict(
                exclude_protection_with_performance_impact=dict(type="bool"),
                exclude_protection_with_performance_impact_mode=dict(
                    type="str",
                    choices=[
                        "very low",
                        "low or lower",
                        "medium or lower",
                        "high or lower",
                    ],
                ),
                exclude_protection_with_severity=dict(type="bool"),
                exclude_protection_with_severity_mode=dict(
                    type="str",
                    choices=[
                        "low or above",
                        "medium or above",
                        "high or above",
                        "critical",
                    ],
                ),
                newly_updated_protections=dict(
                    type="str", choices=["active", "inactive", "staging"]),
            ),
        ),
        malicious_mail_policy_settings=dict(
            type="dict",
            options=dict(
                add_customized_text_to_email_body=dict(type="bool"),
                add_email_subject_prefix=dict(type="bool"),
                add_x_header_to_email=dict(type="bool"),
                email_action=dict(type="str", choices=["allow", "block"]),
                email_body_customized_text=dict(type="str"),
                email_subject_prefix_text=dict(type="str"),
                failed_to_scan_attachments_text=dict(type="str"),
                malicious_attachments_text=dict(type="str"),
                malicious_links_text=dict(type="str"),
                remove_attachments_and_links=dict(type="bool"),
                send_copy=dict(type="bool"),
                send_copy_list=dict(type="list"),
            ),
        ),
        overrides=dict(
            type="list",
            options=dict(
                action=dict(
                    type="str",
                    choices=[
                        "Threat Cloud: Inactive",
                        "Detect",
                        "Prevent <br> Core: Drop",
                        "Inactive",
                        "Accept",
                    ],
                ),
                protection=dict(type="str"),
                capture_packets=dict(type="bool"),
                track=dict(
                    type="str",
                    choices=[
                        "none",
                        "log",
                        "alert",
                        "mail",
                        "snmp trap",
                        "user alert",
                        "user alert 1",
                        "user alert 2",
                    ],
                ),
            ),
        ),
        tags=dict(type="list"),
        use_indicators=dict(type="bool"),
        anti_bot=dict(type="bool"),
        anti_virus=dict(type="bool"),
        ips=dict(type="bool"),
        threat_emulation=dict(type="bool"),
        activate_protections_by_extended_attributes=dict(
            type="list",
            options=dict(name=dict(type="str"), category=dict(type="str")),
        ),
        deactivate_protections_by_extended_attributes=dict(
            type="list",
            options=dict(name=dict(type="str"), category=dict(type="str")),
        ),
        use_extended_attributes=dict(type="bool"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "threat-profile"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#21
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        end=dict(
            type="dict",
            options=dict(
                date=dict(type="str"),
                iso_8601=dict(type="str"),
                posix=dict(type="int"),
                time=dict(type="str"),
            ),
        ),
        end_never=dict(type="bool"),
        hours_ranges=dict(
            type="list",
            options=dict(
                enabled=dict(type="bool"),
                index=dict(type="int"),
                to=dict(type="str"),
            ),
        ),
        start=dict(
            type="dict",
            options=dict(
                date=dict(type="str"),
                iso_8601=dict(type="str"),
                posix=dict(type="int"),
                time=dict(type="str"),
            ),
        ),
        start_now=dict(type="bool"),
        tags=dict(type="list"),
        recurrence=dict(
            type="dict",
            options=dict(
                days=dict(type="list"),
                month=dict(type="str"),
                pattern=dict(type="str"),
                weekdays=dict(type="list"),
            ),
        ),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec["hours_ranges"]["options"]["from"] = dict(type="str")
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "time"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#22
0
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        ip_address=dict(type='str'),
        ipv4_address=dict(type='str'),
        ipv6_address=dict(type='str'),
        anti_bot=dict(type='bool'),
        anti_virus=dict(type='bool'),
        application_control=dict(type='bool'),
        content_awareness=dict(type='bool'),
        firewall=dict(type='bool'),
        firewall_settings=dict(
            type='dict',
            options=dict(
                auto_calculate_connections_hash_table_size_and_memory_pool=dict(
                    type='bool'),
                auto_maximum_limit_for_concurrent_connections=dict(
                    type='bool'),
                connections_hash_size=dict(type='int'),
                maximum_limit_for_concurrent_connections=dict(type='int'),
                maximum_memory_pool_size=dict(type='int'),
                memory_pool_size=dict(type='int'))),
        interfaces=dict(
            type='list',
            options=dict(
                name=dict(type='str'),
                anti_spoofing=dict(type='bool'),
                anti_spoofing_settings=dict(
                    type='dict',
                    options=dict(action=dict(type='str',
                                             choices=['prevent', 'detect']))),
                ip_address=dict(type='str'),
                ipv4_address=dict(type='str'),
                ipv6_address=dict(type='str'),
                network_mask=dict(type='str'),
                ipv4_network_mask=dict(type='str'),
                ipv6_network_mask=dict(type='str'),
                mask_length=dict(type='str'),
                ipv4_mask_length=dict(type='str'),
                ipv6_mask_length=dict(type='str'),
                security_zone=dict(type='bool'),
                security_zone_settings=dict(
                    type='dict',
                    options=dict(auto_calculated=dict(type='bool'),
                                 specific_zone=dict(type='str'))),
                tags=dict(type='list'),
                topology=dict(type='str',
                              choices=['automatic', 'external', 'internal']),
                topology_settings=dict(
                    type='dict',
                    options=dict(
                        interface_leads_to_dmz=dict(type='bool'),
                        ip_address_behind_this_interface=dict(
                            type='str',
                            choices=[
                                'not defined',
                                'network defined by the interface ip and net mask',
                                'network defined by routing', 'specific'
                            ]),
                        specific_network=dict(type='str'))),
                color=dict(type='str',
                           choices=[
                               'aquamarine', 'black', 'blue', 'crete blue',
                               'burlywood', 'cyan', 'dark green', 'khaki',
                               'orchid', 'dark orange', 'dark sea green',
                               'pink', 'turquoise', 'dark blue', 'firebrick',
                               'brown', 'forest green', 'gold', 'dark gold',
                               'gray', 'dark gray', 'light green',
                               'lemon chiffon', 'coral', 'sea green',
                               'sky blue', 'magenta', 'purple', 'slate blue',
                               'violet red', 'navy blue', 'olive', 'orange',
                               'red', 'sienna', 'yellow'
                           ]),
                comments=dict(type='str'),
                details_level=dict(type='str',
                                   choices=['uid', 'standard', 'full']),
                ignore_warnings=dict(type='bool'),
                ignore_errors=dict(type='bool'))),
        ips=dict(type='bool'),
        logs_settings=dict(
            type='dict',
            options=dict(
                alert_when_free_disk_space_below=dict(type='bool'),
                alert_when_free_disk_space_below_threshold=dict(type='int'),
                alert_when_free_disk_space_below_type=dict(
                    type='str',
                    choices=[
                        'none', 'log', 'popup alert', 'mail alert',
                        'snmp trap alert', 'user defined alert no.1',
                        'user defined alert no.2', 'user defined alert no.3'
                    ]),
                before_delete_keep_logs_from_the_last_days=dict(type='bool'),
                before_delete_keep_logs_from_the_last_days_threshold=dict(
                    type='int'),
                before_delete_run_script=dict(type='bool'),
                before_delete_run_script_command=dict(type='str'),
                delete_index_files_older_than_days=dict(type='bool'),
                delete_index_files_older_than_days_threshold=dict(type='int'),
                delete_index_files_when_index_size_above=dict(type='bool'),
                delete_index_files_when_index_size_above_threshold=dict(
                    type='int'),
                delete_when_free_disk_space_below=dict(type='bool'),
                delete_when_free_disk_space_below_threshold=dict(type='int'),
                detect_new_citrix_ica_application_names=dict(type='bool'),
                forward_logs_to_log_server=dict(type='bool'),
                forward_logs_to_log_server_name=dict(type='str'),
                forward_logs_to_log_server_schedule_name=dict(type='str'),
                free_disk_space_metrics=dict(type='str',
                                             choices=['mbytes', 'percent']),
                perform_log_rotate_before_log_forwarding=dict(type='bool'),
                reject_connections_when_free_disk_space_below_threshold=dict(
                    type='bool'),
                reserve_for_packet_capture_metrics=dict(
                    type='str', choices=['percent', 'mbytes']),
                reserve_for_packet_capture_threshold=dict(type='int'),
                rotate_log_by_file_size=dict(type='bool'),
                rotate_log_file_size_threshold=dict(type='int'),
                rotate_log_on_schedule=dict(type='bool'),
                rotate_log_schedule_name=dict(type='str'),
                stop_logging_when_free_disk_space_below=dict(type='bool'),
                stop_logging_when_free_disk_space_below_threshold=dict(
                    type='int'),
                turn_on_qos_logging=dict(type='bool'),
                update_account_log_every=dict(type='int'))),
        one_time_password=dict(type='str'),
        os_name=dict(type='str'),
        save_logs_locally=dict(type='bool'),
        send_alerts_to_server=dict(type='list'),
        send_logs_to_backup_server=dict(type='list'),
        send_logs_to_server=dict(type='list'),
        tags=dict(type='list'),
        threat_emulation=dict(type='bool'),
        threat_extraction=dict(type='bool'),
        url_filtering=dict(type='bool'),
        version=dict(type='str'),
        vpn=dict(type='bool'),
        vpn_settings=dict(
            type='dict',
            options=dict(maximum_concurrent_ike_negotiations=dict(type='int'),
                         maximum_concurrent_tunnels=dict(type='int'))),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'simple-gateway'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#23
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        authentication_method=dict(
            type="str",
            choices=[
                "undefined",
                "check point password",
                "os password",
                "securid",
                "radius",
                "tacacs",
                "ad authentication",
            ],
        ),
        email=dict(type="str"),
        expiration_date=dict(type="str"),
        multi_domain_profile=dict(type="str"),
        must_change_password=dict(type="bool"),
        password=dict(type="str"),
        password_hash=dict(type="str"),
        permissions_profile=dict(type="list",
                                 options=dict(profile=dict(type="str"))),
        phone_number=dict(type="str"),
        radius_server=dict(type="str"),
        tacacs_server=dict(type="str"),
        tags=dict(type="list"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "administrator"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#24
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        applied_profile=dict(type="str"),
        applied_threat_rules=dict(
            type="dict",
            options=dict(add=dict(
                type="list",
                options=dict(
                    layer=dict(type="str"),
                    name=dict(type="str"),
                    rule_number=dict(type="str"),
                    position=dict(type="str"),
                ),
            )),
        ),
        apply_on=dict(
            type="str",
            choices=[
                "all-threat-rules",
                "all-threat-rules-with-specific-profile",
                "manually-select-threat-rules",
            ],
        ),
        tags=dict(type="list"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "exception-group"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#25
0
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        observables=dict(
            type='list',
            options=dict(
                name=dict(type='str'),
                md5=dict(type='str'),
                url=dict(type='str'),
                ip_address=dict(type='str'),
                ip_address_first=dict(type='str'),
                ip_address_last=dict(type='str'),
                domain=dict(type='str'),
                mail_to=dict(type='str'),
                mail_from=dict(type='str'),
                mail_cc=dict(type='str'),
                mail_reply_to=dict(type='str'),
                mail_subject=dict(type='str'),
                confidence=dict(type='str',
                                choices=['low', 'medium', 'high', 'critical']),
                product=dict(type='str', choices=['AV', 'AB']),
                severity=dict(type='str',
                              choices=['low', 'medium', 'high', 'critical']),
                comments=dict(type='str'),
                ignore_warnings=dict(type='bool'),
                ignore_errors=dict(type='bool'))),
        observables_raw_data=dict(type='str'),
        action=dict(type='str',
                    choices=['Inactive', 'Ask', 'Prevent', 'Detect']),
        profile_overrides=dict(type='list',
                               options=dict(action=dict(type='str',
                                                        choices=[
                                                            'Inactive', 'Ask',
                                                            'Prevent', 'Detect'
                                                        ]),
                                            profile=dict(type='str'))),
        tags=dict(type='list'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'threat-indicator'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        active_protections_performance_impact=dict(
            type='str', choices=['high', 'medium', 'low', 'very_low']),
        active_protections_severity=dict(
            type='str',
            choices=['Critical', 'High', 'Medium or above', 'Low or above']),
        confidence_level_high=dict(
            type='str', choices=['Inactive', 'Ask', 'Prevent', 'Detect']),
        confidence_level_low=dict(
            type='str', choices=['Inactive', 'Ask', 'Prevent', 'Detect']),
        confidence_level_medium=dict(
            type='str', choices=['Inactive', 'Ask', 'Prevent', 'Detect']),
        indicator_overrides=dict(type='list',
                                 options=dict(action=dict(type='str',
                                                          choices=[
                                                              'Inactive',
                                                              'Ask', 'Prevent',
                                                              'Detect'
                                                          ]),
                                              indicator=dict(type='str'))),
        ips_settings=dict(
            type='dict',
            options=dict(
                exclude_protection_with_performance_impact=dict(type='bool'),
                exclude_protection_with_performance_impact_mode=dict(
                    type='str',
                    choices=[
                        'very low', 'low or lower', 'medium or lower',
                        'high or lower'
                    ]),
                exclude_protection_with_severity=dict(type='bool'),
                exclude_protection_with_severity_mode=dict(
                    type='str',
                    choices=[
                        'low or above', 'medium or above', 'high or above',
                        'critical'
                    ]),
                newly_updated_protections=dict(
                    type='str', choices=['active', 'inactive', 'staging']))),
        malicious_mail_policy_settings=dict(
            type='dict',
            options=dict(add_customized_text_to_email_body=dict(type='bool'),
                         add_email_subject_prefix=dict(type='bool'),
                         add_x_header_to_email=dict(type='bool'),
                         email_action=dict(type='str',
                                           choices=['allow', 'block']),
                         email_body_customized_text=dict(type='str'),
                         email_subject_prefix_text=dict(type='str'),
                         failed_to_scan_attachments_text=dict(type='str'),
                         malicious_attachments_text=dict(type='str'),
                         malicious_links_text=dict(type='str'),
                         remove_attachments_and_links=dict(type='bool'),
                         send_copy=dict(type='bool'),
                         send_copy_list=dict(type='list'))),
        overrides=dict(type='list',
                       options=dict(action=dict(type='str',
                                                choices=[
                                                    'Threat Cloud: Inactive',
                                                    'Detect',
                                                    'Prevent <br> Core: Drop',
                                                    'Inactive', 'Accept'
                                                ]),
                                    protection=dict(type='str'),
                                    capture_packets=dict(type='bool'),
                                    track=dict(type='str',
                                               choices=[
                                                   'none', 'log', 'alert',
                                                   'mail', 'snmp trap',
                                                   'user alert',
                                                   'user alert 1',
                                                   'user alert 2'
                                               ]))),
        tags=dict(type='list'),
        use_indicators=dict(type='bool'),
        anti_bot=dict(type='bool'),
        anti_virus=dict(type='bool'),
        ips=dict(type='bool'),
        threat_emulation=dict(type='bool'),
        activate_protections_by_extended_attributes=dict(
            type='list',
            options=dict(name=dict(type='str'), category=dict(type='str'))),
        deactivate_protections_by_extended_attributes=dict(
            type='list',
            options=dict(name=dict(type='str'), category=dict(type='str'))),
        use_extended_attributes=dict(type='bool'),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'threat-profile'

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        ip_address=dict(type="str"),
        ipv4_address=dict(type="str"),
        ipv6_address=dict(type="str"),
        anti_bot=dict(type="bool"),
        anti_virus=dict(type="bool"),
        application_control=dict(type="bool"),
        content_awareness=dict(type="bool"),
        firewall=dict(type="bool"),
        firewall_settings=dict(
            type="dict",
            options=dict(
                auto_calculate_connections_hash_table_size_and_memory_pool=dict(
                    type="bool"
                ),
                auto_maximum_limit_for_concurrent_connections=dict(
                    type="bool"
                ),
                connections_hash_size=dict(type="int"),
                maximum_limit_for_concurrent_connections=dict(type="int"),
                maximum_memory_pool_size=dict(type="int"),
                memory_pool_size=dict(type="int"),
            ),
        ),
        interfaces=dict(
            type="list",
            options=dict(
                name=dict(type="str"),
                anti_spoofing=dict(type="bool"),
                anti_spoofing_settings=dict(
                    type="dict",
                    options=dict(
                        action=dict(type="str", choices=["prevent", "detect"])
                    ),
                ),
                ip_address=dict(type="str"),
                ipv4_address=dict(type="str"),
                ipv6_address=dict(type="str"),
                network_mask=dict(type="str"),
                ipv4_network_mask=dict(type="str"),
                ipv6_network_mask=dict(type="str"),
                mask_length=dict(type="str"),
                ipv4_mask_length=dict(type="str"),
                ipv6_mask_length=dict(type="str"),
                security_zone=dict(type="bool"),
                security_zone_settings=dict(
                    type="dict",
                    options=dict(
                        auto_calculated=dict(type="bool"),
                        specific_zone=dict(type="str"),
                    ),
                ),
                tags=dict(type="list"),
                topology=dict(
                    type="str", choices=["automatic", "external", "internal"]
                ),
                topology_settings=dict(
                    type="dict",
                    options=dict(
                        interface_leads_to_dmz=dict(type="bool"),
                        ip_address_behind_this_interface=dict(
                            type="str",
                            choices=[
                                "not defined",
                                "network defined by the interface ip and net mask",
                                "network defined by routing",
                                "specific",
                            ],
                        ),
                        specific_network=dict(type="str"),
                    ),
                ),
                color=dict(
                    type="str",
                    choices=[
                        "aquamarine",
                        "black",
                        "blue",
                        "crete blue",
                        "burlywood",
                        "cyan",
                        "dark green",
                        "khaki",
                        "orchid",
                        "dark orange",
                        "dark sea green",
                        "pink",
                        "turquoise",
                        "dark blue",
                        "firebrick",
                        "brown",
                        "forest green",
                        "gold",
                        "dark gold",
                        "gray",
                        "dark gray",
                        "light green",
                        "lemon chiffon",
                        "coral",
                        "sea green",
                        "sky blue",
                        "magenta",
                        "purple",
                        "slate blue",
                        "violet red",
                        "navy blue",
                        "olive",
                        "orange",
                        "red",
                        "sienna",
                        "yellow",
                    ],
                ),
                comments=dict(type="str"),
                details_level=dict(
                    type="str", choices=["uid", "standard", "full"]
                ),
                ignore_warnings=dict(type="bool"),
                ignore_errors=dict(type="bool"),
            ),
        ),
        ips=dict(type="bool"),
        logs_settings=dict(
            type="dict",
            options=dict(
                alert_when_free_disk_space_below=dict(type="bool"),
                alert_when_free_disk_space_below_threshold=dict(type="int"),
                alert_when_free_disk_space_below_type=dict(
                    type="str",
                    choices=[
                        "none",
                        "log",
                        "popup alert",
                        "mail alert",
                        "snmp trap alert",
                        "user defined alert no.1",
                        "user defined alert no.2",
                        "user defined alert no.3",
                    ],
                ),
                before_delete_keep_logs_from_the_last_days=dict(type="bool"),
                before_delete_keep_logs_from_the_last_days_threshold=dict(
                    type="int"
                ),
                before_delete_run_script=dict(type="bool"),
                before_delete_run_script_command=dict(type="str"),
                delete_index_files_older_than_days=dict(type="bool"),
                delete_index_files_older_than_days_threshold=dict(type="int"),
                delete_index_files_when_index_size_above=dict(type="bool"),
                delete_index_files_when_index_size_above_threshold=dict(
                    type="int"
                ),
                delete_when_free_disk_space_below=dict(type="bool"),
                delete_when_free_disk_space_below_threshold=dict(type="int"),
                detect_new_citrix_ica_application_names=dict(type="bool"),
                forward_logs_to_log_server=dict(type="bool"),
                forward_logs_to_log_server_name=dict(type="str"),
                forward_logs_to_log_server_schedule_name=dict(type="str"),
                free_disk_space_metrics=dict(
                    type="str", choices=["mbytes", "percent"]
                ),
                perform_log_rotate_before_log_forwarding=dict(type="bool"),
                reject_connections_when_free_disk_space_below_threshold=dict(
                    type="bool"
                ),
                reserve_for_packet_capture_metrics=dict(
                    type="str", choices=["percent", "mbytes"]
                ),
                reserve_for_packet_capture_threshold=dict(type="int"),
                rotate_log_by_file_size=dict(type="bool"),
                rotate_log_file_size_threshold=dict(type="int"),
                rotate_log_on_schedule=dict(type="bool"),
                rotate_log_schedule_name=dict(type="str"),
                stop_logging_when_free_disk_space_below=dict(type="bool"),
                stop_logging_when_free_disk_space_below_threshold=dict(
                    type="int"
                ),
                turn_on_qos_logging=dict(type="bool"),
                update_account_log_every=dict(type="int"),
            ),
        ),
        one_time_password=dict(type="str"),
        os_name=dict(type="str"),
        save_logs_locally=dict(type="bool"),
        send_alerts_to_server=dict(type="list"),
        send_logs_to_backup_server=dict(type="list"),
        send_logs_to_server=dict(type="list"),
        tags=dict(type="list"),
        threat_emulation=dict(type="bool"),
        threat_extraction=dict(type="bool"),
        url_filtering=dict(type="bool"),
        version=dict(type="str"),
        vpn=dict(type="bool"),
        vpn_settings=dict(
            type="dict",
            options=dict(
                maximum_concurrent_ike_negotiations=dict(type="int"),
                maximum_concurrent_tunnels=dict(type="int"),
            ),
        ),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(
        argument_spec=argument_spec, supports_check_mode=True
    )
    api_call_object = "simple-gateway"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#28
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        subnet=dict(type="str"),
        subnet4=dict(type="str"),
        subnet6=dict(type="str"),
        mask_length=dict(type="int"),
        mask_length4=dict(type="int"),
        mask_length6=dict(type="int"),
        subnet_mask=dict(type="str"),
        nat_settings=dict(
            type="dict",
            options=dict(
                auto_rule=dict(type="bool"),
                ip_address=dict(type="str"),
                ipv4_address=dict(type="str"),
                ipv6_address=dict(type="str"),
                hide_behind=dict(type="str", choices=["gateway",
                                                      "ip-address"]),
                install_on=dict(type="str"),
                method=dict(type="str", choices=["hide", "static"]),
            ),
        ),
        tags=dict(type="list"),
        broadcast=dict(type="str", choices=["disallow", "allow"]),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        groups=dict(type="list"),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "network"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
示例#29
0
def main():
    argument_spec = dict(
        name=dict(type="str", required=True),
        add_default_rule=dict(type="bool"),
        applications_and_url_filtering=dict(type="bool"),
        content_awareness=dict(type="bool"),
        detect_using_x_forward_for=dict(type="bool"),
        firewall=dict(type="bool"),
        implicit_cleanup_action=dict(type="str", choices=["drop", "accept"]),
        mobile_access=dict(type="bool"),
        shared=dict(type="bool"),
        tags=dict(type="list"),
        color=dict(
            type="str",
            choices=[
                "aquamarine",
                "black",
                "blue",
                "crete blue",
                "burlywood",
                "cyan",
                "dark green",
                "khaki",
                "orchid",
                "dark orange",
                "dark sea green",
                "pink",
                "turquoise",
                "dark blue",
                "firebrick",
                "brown",
                "forest green",
                "gold",
                "dark gold",
                "gray",
                "dark gray",
                "light green",
                "lemon chiffon",
                "coral",
                "sea green",
                "sky blue",
                "magenta",
                "purple",
                "slate blue",
                "violet red",
                "navy blue",
                "olive",
                "orange",
                "red",
                "sienna",
                "yellow",
            ],
        ),
        comments=dict(type="str"),
        details_level=dict(type="str", choices=["uid", "standard", "full"]),
        ignore_warnings=dict(type="bool"),
        ignore_errors=dict(type="bool"),
    )
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = "access-layer"

    result = api_call(module, api_call_object)
    module.exit_json(**result)
def main():
    argument_spec = dict(
        name=dict(type='str', required=True),
        ip_address=dict(type='str'),
        ipv4_address=dict(type='str'),
        ipv6_address=dict(type='str'),
        interfaces=dict(
            type='list',
            options=dict(
                name=dict(type='str'),
                subnet=dict(type='str'),
                subnet4=dict(type='str'),
                subnet6=dict(type='str'),
                mask_length=dict(type='int'),
                mask_length4=dict(type='int'),
                mask_length6=dict(type='int'),
                subnet_mask=dict(type='str'),
                color=dict(type='str',
                           choices=[
                               'aquamarine', 'black', 'blue', 'crete blue',
                               'burlywood', 'cyan', 'dark green', 'khaki',
                               'orchid', 'dark orange', 'dark sea green',
                               'pink', 'turquoise', 'dark blue', 'firebrick',
                               'brown', 'forest green', 'gold', 'dark gold',
                               'gray', 'dark gray', 'light green',
                               'lemon chiffon', 'coral', 'sea green',
                               'sky blue', 'magenta', 'purple', 'slate blue',
                               'violet red', 'navy blue', 'olive', 'orange',
                               'red', 'sienna', 'yellow'
                           ]),
                comments=dict(type='str'),
                details_level=dict(type='str',
                                   choices=['uid', 'standard', 'full']),
                ignore_warnings=dict(type='bool'),
                ignore_errors=dict(type='bool'))),
        nat_settings=dict(
            type='dict',
            options=dict(auto_rule=dict(type='bool'),
                         ip_address=dict(type='str'),
                         ipv4_address=dict(type='str'),
                         ipv6_address=dict(type='str'),
                         hide_behind=dict(type='str',
                                          choices=['gateway', 'ip-address']),
                         install_on=dict(type='str'),
                         method=dict(type='str', choices=['hide', 'static']))),
        tags=dict(type='list'),
        host_servers=dict(
            type='dict',
            options=dict(dns_server=dict(type='bool'),
                         mail_server=dict(type='bool'),
                         web_server=dict(type='bool'),
                         web_server_config=dict(
                             type='dict',
                             options=dict(
                                 additional_ports=dict(type='list'),
                                 application_engines=dict(type='list'),
                                 listen_standard_port=dict(type='bool'),
                                 operating_system=dict(type='str',
                                                       choices=[
                                                           'sparc linux',
                                                           'windows', 'other',
                                                           'x86 linux',
                                                           'sparc solaris'
                                                       ]),
                                 protected_by=dict(type='str'))))),
        color=dict(type='str',
                   choices=[
                       'aquamarine', 'black', 'blue', 'crete blue',
                       'burlywood', 'cyan', 'dark green', 'khaki', 'orchid',
                       'dark orange', 'dark sea green', 'pink', 'turquoise',
                       'dark blue', 'firebrick', 'brown', 'forest green',
                       'gold', 'dark gold', 'gray', 'dark gray', 'light green',
                       'lemon chiffon', 'coral', 'sea green', 'sky blue',
                       'magenta', 'purple', 'slate blue', 'violet red',
                       'navy blue', 'olive', 'orange', 'red', 'sienna',
                       'yellow'
                   ]),
        comments=dict(type='str'),
        details_level=dict(type='str', choices=['uid', 'standard', 'full']),
        groups=dict(type='list'),
        ignore_warnings=dict(type='bool'),
        ignore_errors=dict(type='bool'))
    argument_spec.update(checkpoint_argument_spec_for_objects)

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)
    api_call_object = 'host'

    result = api_call(module, api_call_object)
    module.exit_json(**result)