{"id":16781011,"url":"https://github.com/resmo/ansible-exoscale-dns","last_synced_at":"2025-03-16T20:23:43.751Z","repository":{"id":66825023,"uuid":"66438226","full_name":"resmo/ansible-exoscale-dns","owner":"resmo","description":"Modules for managing Exoscale DNS","archived":false,"fork":false,"pushed_at":"2016-08-24T07:57:29.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T07:08:59.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-24T06:44:09.000Z","updated_at":"2016-12-23T09:11:25.000Z","dependencies_parsed_at":"2023-08-01T08:16:00.097Z","dependency_job_id":null,"html_url":"https://github.com/resmo/ansible-exoscale-dns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resmo%2Fansible-exoscale-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resmo%2Fansible-exoscale-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resmo%2Fansible-exoscale-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resmo%2Fansible-exoscale-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resmo","download_url":"https://codeload.github.com/resmo/ansible-exoscale-dns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926016,"owners_count":20369916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:36:30.065Z","updated_at":"2025-03-16T20:23:43.721Z","avatar_url":"https://github.com/resmo.png","language":"Python","funding_links":["https://www.paypal.me/resmo"],"categories":[],"sub_categories":[],"readme":"# Ansible Exoscale DNS Modules\n\nManages domains and records on Exoscale. The modules support `--check_mode` and `--diff` as well\n\n## Summary\n\nAnsible does not include any modules to manage Exoscale DNS.\n\nBut no worries, I created them for your :). With a few simple installation steps you can already use them in Ansible 2.1. These steps become obsolete in future versions of Ansible when the modules `exo_dns_domain` and `exo_dns_record` are shipped with Ansible in 2.2.\n\n## Installation\n\nFor using customs modules, Ansible will check for modules in a `./library` directory along with your playbooks. So let's create a diretory `library`:\n\n    cd my_ansible_project\n    mkdir library\n\nDownload the modules into `library`:\n\n    wget -P library https://raw.githubusercontent.com/resmo/ansible-exoscale-dns/master/exo_dns_domain.py\n    wget -P library https://raw.githubusercontent.com/resmo/ansible-exoscale-dns/master/exo_dns_record.py\n\nAfter this setup, we will be able to read the docs of these modules including examples, e.g.:\n\n    ansible-doc exo_dns_domain\n    ansible-doc exo_dns_record\n\n## Authentication\n\nExoscale's computing and DNS API share the same API keys and secret, that is why the modules support the same authentication methods as the cloudstack modules.\n\n### cloudstack.ini\nIf you have an existing `cloudstack.ini` file, the configration will be also used by the DNS modules. Please see [Ansible CloudStack Guide](http://docs.ansible.com/ansible/guide_cloudstack.html) for more information.\n\nIn the simplest setup you create a `cloudstack.ini` file with the following structure nearby your playbooks:\n\n~~~ini\n[cloudstack]\nendpoint = https://api.exoscale.ch/compute\nkey = api key\nsecret = api secret\n~~~\n\n#### Note\n\nThe endpoint is used for the compute API and must **not** point to the DNS API. The modules just read and use the same keys.\n\nAlternatively the modules allows to pass the `api_key` and `api_secret`as arguments along with the module arguments:\n\n~~~yaml\n# Create or update an A record.\n- local_action:\n    module: exo_dns_record\n    name: web-vm-1\n    domain: example.com\n    content: 1.2.3.4\n    api_key: \"{{ your_api_key }}\"\n    api_secret: \"{{ your_api_secret }}\"\n~~~\n\n## Examples\n\n### exo_dns_domain\n\n~~~yaml\n# Create a domain.\n- local_action:\n    module: exo_dns_domain\n    name: example.com\n\n# Remove a domain.\n- local_action:\n    module: exo_dns_domain\n    name: example.com\n    state: absent\n~~~\n\n### exo_dns_record\n\nAfter creating the domain, we are able to add records to it:\n\n~~~yaml\n# Create or update an A record.\n- local_action:\n    module: exo_dns_record\n    name: web-vm-1\n    domain: example.com\n    content: 1.2.3.4\n\n# Update an existing A record with a new IP.\n- local_action:\n    module: exo_dns_record\n    name: web-vm-1\n    domain: example.com\n    content: 1.2.3.5\n\n# Create another A record with same name.\n- local_action:\n    module: exo_dns_record\n    name: web-vm-1\n    domain: example.com\n    content: 1.2.3.6\n    multiple: yes\n\n# Create or update a CNAME record.\n- local_action:\n    module: exo_dns_record\n    name: www\n    domain: example.com\n    record_type: CNAME\n    content: web-vm-1\n\n# Create or update a MX record.\n- local_action:\n    module: exo_dns_record\n    domain: example.com\n    record_type: MX\n    content: mx1.example.com\n    prio: 10\n\n# delete a MX record.\n- local_action:\n    module: exo_dns_record\n    domain: example.com\n    record_type: MX\n    content: mx1.example.com\n    state: absent\n\n# Remove a record.\n- local_action:\n    module: exo_dns_record\n    name: www\n    domain: example.com\n    state: absent\n~~~\n\n## Integration Tests\n\nIntegration Tests can be found in the `test` directory:\n\nRun the tests (cloudstack.ini must exist and be setup):\n\n    cd test\n    ansible-playbook exoscale.yml -e \"exo_dns_domain_name=example.com\" -vv --diff\n\n## Donations\n\nUse it? I would appreciate a donaton for my works [Paypal](https://www.paypal.me/resmo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresmo%2Fansible-exoscale-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresmo%2Fansible-exoscale-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresmo%2Fansible-exoscale-dns/lists"}