def define_module():
     return AnsibleModule(
         argument_spec=dict(id={"type": "int"},
                            name={"type": "str"},
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
예제 #2
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'],
                            },
                            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"
                            },
                            **Hcloud.base_module_arguments()),
         supports_check_mode=True,
     )
 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,
     )
예제 #5
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
                            },
                            state={
                                "choices": [
                                    "absent", "present", "restarted",
                                    "started", "stopped", "rebuild"
                                ],
                                "default":
                                "present",
                            },
                            **Hcloud.base_module_arguments()),
         required_one_of=[['id', 'name']],
         mutually_exclusive=[["location", "datacenter"]],
         supports_check_mode=True,
     )
 def __init__(self, module):
     Hcloud.__init__(self, module,
                     "jctanner.cloud_hcloud.hcloud_server_facts")
     self.jctanner.cloud_hcloud.hcloud_server_facts = None
예제 #7
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "jctanner.cloud_hcloud.hcloud_floating_ip_facts")
     self.jctanner.cloud_hcloud.hcloud_floating_ip_facts = None
 def __init__(self, module):
     Hcloud.__init__(self, module, "jctanner.cloud_hcloud.hcloud_ssh_key")
     self.jctanner.cloud_hcloud.hcloud_ssh_key = None
 def __init__(self, module):
     Hcloud.__init__(self, module,
                     "jctanner.cloud_hcloud.hcloud_location_facts")
     self.jctanner.cloud_hcloud.hcloud_location_facts = None
예제 #10
0
 def __init__(self, module):
     Hcloud.__init__(self, module, "jctanner.cloud_hcloud.hcloud_volume")
     self.jctanner.cloud_hcloud.hcloud_volume = None