Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f1abb8cb37 | |||
6544f2acc8 | |||
bebccfab99 | |||
ff000ed5b1 | |||
f4a49b5843 |
@ -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.
|
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
|
## Gandi DNS Setup
|
||||||
|
|
||||||
If you want to use the `gandi_dns` module you need to prepare the environment.
|
If you want to use the `gandi_dns` module you need to prepare the environment.
|
||||||
@ -63,8 +69,7 @@ task or expose it in the environment and it will be picked up.
|
|||||||
Include an entry in your `requirements.yml` like so.
|
Include an entry in your `requirements.yml` like so.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi
|
- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi/archive/0.0.4.tar.gz
|
||||||
version: 0.0.2
|
|
||||||
name: autonomic.gandi
|
name: autonomic.gandi
|
||||||
```
|
```
|
||||||
|
|
||||||
|
1
defaults/main.yml
Normal file
1
defaults/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
@ -5,11 +5,7 @@ import os
|
|||||||
import traceback
|
import traceback
|
||||||
from subprocess import CalledProcessError, check_output
|
from subprocess import CalledProcessError, check_output
|
||||||
|
|
||||||
from ansible.module_utils.basic import (
|
from ansible.module_utils.basic import AnsibleModule, env_fallback
|
||||||
AnsibleModule,
|
|
||||||
env_fallback,
|
|
||||||
missing_required_lib,
|
|
||||||
)
|
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
---
|
---
|
||||||
@ -177,7 +173,11 @@ def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not HAS_DNS_LEXICON_DEPENDENCY:
|
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)
|
module.fail_json(msg=msg, exception=DNS_LEXICON_IMP_ERR)
|
||||||
|
|
||||||
domains = retrieve_domain_info(module)
|
domains = retrieve_domain_info(module)
|
||||||
|
13
meta/main.yml
Normal file
13
meta/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
author: autonomic
|
||||||
|
description: Ansible libraries for managing Gandi resources.
|
||||||
|
company: Autonomic
|
||||||
|
license: GPLv
|
||||||
|
min_ansible_version: 2.9.6
|
||||||
|
platforms:
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- buster
|
@ -13,7 +13,7 @@ include_trailing_comma = True
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = autonomic.gandi
|
name = autonomic.gandi
|
||||||
author = decentral1se
|
author = decentral1se
|
||||||
version = 0.0.2
|
version = 0.0.4
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
packages = find:
|
packages = find:
|
||||||
|
1
tasks/main.yml
Normal file
1
tasks/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
Reference in New Issue
Block a user