コード例 #1
0
 def define_module():
     return AnsibleModule(
         argument_spec=dict(id={"type": "int"},
                            label_selector={"type": "str"},
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
コード例 #2
0
 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,
     )
コード例 #3
0
 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,
     )
コード例 #4
0
 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,
     )
コード例 #5
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,
     )
コード例 #6
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,
     )
コード例 #7
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,
     )
コード例 #8
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,
     )
コード例 #9
0
 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,
     )
コード例 #10
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_floating_ip_info")
     self.hcloud_floating_ip_info = None
コード例 #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")
     self.hcloud_volume = None
コード例 #13
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_ssh_key_info")
     self.hcloud_ssh_key_info = None
コード例 #14
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_server_type_info")
     self.hcloud_server_type_info = None
コード例 #15
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_datacenter_info")
     self.hcloud_datacenter_info = None
コード例 #16
0
 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_image_info")
     self.hcloud_image_info = None
コード例 #18
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "hcloud_server")
     self.hcloud_server = None