diff --git a/README.md b/README.md index 15821f3..8a57178 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ task or expose it in the environment and it will be picked up. Include an entry in your `requirements.yml` like so. ```yaml -- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi/archive/0.0.4.tar.gz +- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi/archive/0.0.5.tar.gz name: autonomic.gandi ``` diff --git a/library/gandi_dns.py b/library/gandi_dns.py index 5d83d08..c496fe3 100644 --- a/library/gandi_dns.py +++ b/library/gandi_dns.py @@ -70,18 +70,19 @@ def error_msg(domain): ).format(domain=domain) -def get_env(): +def get_env(module): """Build environment for running command-line commands.""" env = os.environ.copy() env["PROVIDER"] = "gandi" env["LEXICON_GANDI_API_PROTOCOL"] = "rest" + env["LEXICON_GANDI_AUTH_TOKEN"] = module.params["gandi_rest_token"] return env def retrieve_domain_info(module): """Retrieve all information about a specific domain.""" domain = module.params["domain"] - env = get_env() + env = get_env(module) try: return json.loads( @@ -98,7 +99,7 @@ def create_domain(module): """Create a new DNS entry.""" domain = module.params["domain"] ipv4 = module.params["ipv4"] - env = get_env() + env = get_env(module) try: return json.loads( @@ -127,7 +128,7 @@ def delete_domain(module): """Delete an existing DNS entry.""" domain = module.params["domain"] ipv4 = module.params["ipv4"] - env = get_env() + env = get_env(module) try: return json.loads( diff --git a/setup.cfg b/setup.cfg index 07def5c..a935020 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,7 @@ include_trailing_comma = True [metadata] name = autonomic.gandi author = decentral1se -version = 0.0.4 +version = 0.0.5 [options] packages = find: