예제 #1
0
def main():
    provider_information = create_hetzner_provider_information()
    argument_spec = create_hetzner_argument_spec()
    argument_spec.merge(
        create_module_argument_spec(provider_information=provider_information))
    module = AnsibleModule(supports_check_mode=True,
                           **argument_spec.to_kwargs())
    run_module(module,
               lambda: create_hetzner_api(ModuleOptionProvider(module),
                                          ModuleHTTPHelper(module)),
               provider_information=provider_information)
예제 #2
0
def main():
    provider_information = create_hetzner_provider_information()
    argument_spec = create_hetzner_argument_spec()
    argument_spec.merge(
        create_module_argument_spec(provider_information=provider_information))
    argument_spec.argument_spec['prefix']['aliases'] = ['name']
    argument_spec.argument_spec['prefix']['deprecated_aliases'] = [
        dict(name='name', version='3.0.0', collection_name='community.dns')
    ]
    module = AnsibleModule(supports_check_mode=True,
                           **argument_spec.to_kwargs())
    run_module(module,
               lambda: create_hetzner_api(ModuleOptionProvider(module),
                                          ModuleHTTPHelper(module)),
               provider_information=provider_information)
 def setup_api(self):
     self.provider_information = create_hetzner_provider_information()
     self.api = create_hetzner_api(TemplatedOptionProvider(self, self.templar), OpenURLHelper())