Exemplo n.º 1
0
def main():
    argument_spec = scaleway_argument_spec()
    argument_spec.update(
        dict(
            image=dict(required=True),
            name=dict(),
            region=dict(required=True, choices=SCALEWAY_LOCATION.keys()),
            commercial_type=dict(required=True),
            enable_ipv6=dict(default=False, type="bool"),
            public_ip=dict(default="absent"),
            state=dict(choices=state_strategy.keys(), default='present'),
            tags=dict(type="list", default=[]),
            organization=dict(required=True),
            wait=dict(type="bool", default=False),
            wait_timeout=dict(type="int", default=300),
            wait_sleep_time=dict(type="int", default=3),
            security_group=dict(),
        ))
    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=True,
    )

    core(module)
Exemplo n.º 2
0
 def _get_zones(self, config_zones):
     return set(SCALEWAY_LOCATION.keys()).intersection(config_zones)
Exemplo n.º 3
0
 def _get_zones(self):
     config_zones = self.get_option("regions")
     return set(SCALEWAY_LOCATION.keys()).intersection(config_zones)
Exemplo n.º 4
0
 def _get_zones(self):
     config_zones = self.get_option("regions")
     return set(SCALEWAY_LOCATION.keys()).intersection(config_zones)