예제 #1
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(id={"type": "int"},
                            name={"type": "str"},
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
 def define_module():
     return AnsibleModule(
         argument_spec=dict(
             id={"type": "int"},
             name={"type": "str"},
             image={"type": "str"},
             server_type={"type": "str"},
             location={"type": "str"},
             datacenter={"type": "str"},
             user_data={"type": "str"},
             ssh_keys={"type": "list"},
             volumes={"type": "list"},
             labels={"type": "dict"},
             backups={"type": "bool", "default": False},
             upgrade_disk={"type": "bool", "default": False},
             force_upgrade={"type": "bool", "default": False},
             rescue_mode={"type": "str"},
             delete_protection={"type": "bool"},
             rebuild_protection={"type": "bool"},
             state={
                 "choices": ["absent", "present", "restarted", "started", "stopped", "rebuild"],
                 "default": "present",
             },
             **Hcloud.base_module_arguments()
         ),
         required_one_of=[['id', 'name']],
         mutually_exclusive=[["location", "datacenter"]],
         required_together=[["delete_protection", "rebuild_protection"]],
         supports_check_mode=True,
     )
 def define_module():
     return AnsibleModule(
         argument_spec=dict(network={
             "type": "str",
             "required": True
         },
                            network_zone={
                                "type": "str",
                                "required": True
                            },
                            type={
                                "type": "str",
                                "required": True
                            },
                            ip_range={
                                "type": "str",
                                "required": True
                            },
                            state={
                                "choices": ["absent", "present"],
                                "default": "present",
                            },
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
 def define_module():
     return AnsibleModule(
         argument_spec=dict(id={"type": "int"},
                            name={"type": "str"},
                            size={"type": "int"},
                            location={"type": "str"},
                            server={"type": "str"},
                            labels={"type": "dict"},
                            automount={
                                "type": "bool",
                                "default": False
                            },
                            format={
                                "type": "str",
                                "choices": ['xfs', 'ext4'],
                            },
                            delete_protection={"type": "bool"},
                            state={
                                "choices": ["absent", "present"],
                                "default": "present",
                            },
                            **Hcloud.base_module_arguments()),
         required_one_of=[['id', 'name']],
         mutually_exclusive=[["location", "server"]],
         supports_check_mode=True,
     )
 def define_module():
     return AnsibleModule(
         argument_spec=dict(
             id={"type": "int"},
             name={"type": "str"},
             label_selector={"type": "str"},
             type={"choices": ["system", "snapshot", "backup"], "default": "system", "type": "str"},
             **Hcloud.base_module_arguments()
         ),
         supports_check_mode=True,
     )
예제 #6
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(
             network={"type": "str", "required": True},
             server={"type": "str", "required": True},
             ip={"type": "str"},
             alias_ips={"type": "list"},
             state={
                 "choices": ["absent", "present"],
                 "default": "present",
             },
             **Hcloud.base_module_arguments()
         ),
         supports_check_mode=True,
     )
예제 #7
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(id={"type": "int"},
                            name={"type": "str"},
                            public_key={"type": "str"},
                            fingerprint={"type": "str"},
                            labels={"type": "dict"},
                            state={
                                "choices": ["absent", "present"],
                                "default": "present",
                            },
                            **Hcloud.base_module_arguments()),
         required_one_of=[['id', 'name', 'fingerprint']],
         required_if=[['state', 'present', ['name']]],
         supports_check_mode=True,
     )
예제 #8
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(
             id={"type": "int"},
             name={"type": "str"},
             ip_range={"type": "str"},
             labels={"type": "dict"},
             delete_protection={"type": "bool"},
             state={
                 "choices": ["absent", "present"],
                 "default": "present",
             },
             **Hcloud.base_module_arguments()
         ),
         required_one_of=[['id', 'name']],
         supports_check_mode=True,
     )
예제 #9
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(server={
             "type": "str",
             "required": True
         },
                            ip_address={
                                "type": "str",
                                "required": True
                            },
                            dns_ptr={"type": "str"},
                            state={
                                "choices": ["absent", "present"],
                                "default": "present",
                            },
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
예제 #10
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(
             id={"type": "int"},
             name={"type": "str"},
             description={"type": "str"},
             server={"type": "str"},
             home_location={"type": "str"},
             force={"type": "bool"},
             type={"choices": ["ipv4", "ipv6"]},
             labels={"type": "dict"},
             delete_protection={"type": "bool"},
             state={
                 "choices": ["absent", "present"],
                 "default": "present",
             },
             **Hcloud.base_module_arguments()
         ),
         required_one_of=[['id', 'name']],
         mutually_exclusive=[['home_location', 'server']],
         supports_check_mode=True,
     )
예제 #11
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_location_info")
     self.hcloud_location_info = None
예제 #12
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_volume_info")
     self.hcloud_volume_info = None
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_server_info")
     self.hcloud_server_info = None
예제 #14
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_datacenter_info")
     self.hcloud_datacenter_info = None
예제 #15
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_ssh_key")
     self.hcloud_ssh_key = None
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_network_info")
     self.hcloud_network_info = None
예제 #17
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_floating_ip_info")
     self.hcloud_floating_ip_info = None