diff --git a/README.md b/README.md index a3c06c4..3bced35 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ $ pip install ansible==2.6.9 "dns-lexicon[gandi]==3.3.19" These should be present on the localhost where you run Ansible. +You can also get `dns-lexicon` via `apt`. + +```bash +$ apt install -y python3-lexicon +``` + ## Gandi DNS Setup If you want to use the `gandi_dns` module you need to prepare the environment. @@ -63,7 +69,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.3.tar.gz +- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi/archive/0.0.4.tar.gz name: autonomic.gandi ``` diff --git a/library/gandi_dns.py b/library/gandi_dns.py index 0ac1112..5d83d08 100644 --- a/library/gandi_dns.py +++ b/library/gandi_dns.py @@ -5,11 +5,7 @@ import os import traceback from subprocess import CalledProcessError, check_output -from ansible.module_utils.basic import ( - AnsibleModule, - env_fallback, - missing_required_lib, -) +from ansible.module_utils.basic import AnsibleModule, env_fallback DOCUMENTATION = """ --- @@ -177,7 +173,11 @@ def main(): ) if not HAS_DNS_LEXICON_DEPENDENCY: - msg = missing_required_lib("lexicon") + msg = ( + "Missing dns-lexicon, please run apt " + "install -y python3-lexicon or install it " + " using the Ansible `apt` module." + ) module.fail_json(msg=msg, exception=DNS_LEXICON_IMP_ERR) domains = retrieve_domain_info(module) diff --git a/setup.cfg b/setup.cfg index e79b09e..07def5c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,7 @@ include_trailing_comma = True [metadata] name = autonomic.gandi author = decentral1se -version = 0.0.3 +version = 0.0.4 [options] packages = find: