{"id":13766477,"url":"https://github.com/arachnys/ansible-cloudflare","last_synced_at":"2025-05-08T21:43:47.246Z","repository":{"id":70875438,"uuid":"136609141","full_name":"arachnys/ansible-cloudflare","owner":"arachnys","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-08T11:18:02.000Z","size":27,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T21:43:42.290Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arachnys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-08T11:17:20.000Z","updated_at":"2024-04-14T08:57:09.000Z","dependencies_parsed_at":"2023-02-22T03:15:16.511Z","dependency_job_id":null,"html_url":"https://github.com/arachnys/ansible-cloudflare","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/arachnys%2Fansible-cloudflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arachnys%2Fansible-cloudflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arachnys%2Fansible-cloudflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arachnys%2Fansible-cloudflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arachnys","download_url":"https://codeload.github.com/arachnys/ansible-cloudflare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253153884,"owners_count":21862423,"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-08-03T16:00:55.827Z","updated_at":"2025-05-08T21:43:47.224Z","avatar_url":"https://github.com/arachnys.png","language":"Python","funding_links":[],"categories":["Automation"],"sub_categories":["Ansible"],"readme":"ansible-cloudflare\n==================\n\nAn ansible module for managing CloudFlare DNS records.\n\nThis module makes use of the rec\\_new and rec\\_delete API\ncalls, with the following parameters: z, type, id, name, content, ttl.\nOther methods and parameters of the API have yet to be implemented.\n\nPlease see the [CloudFlare Client API documentation][] for more\ninformation about the different methods and parameters available.\n\nInstallation\n------------\n\n### Ansible Galaxy\n\nThe [Ansible Galaxy][] is a collection of third-party roles for ansible. You\ncan install ansible-cloudflare from the galaxy by executing the following command:\n\n    ansible-galaxy install DrMegahertz.cloudflare\n\nPlease note that you'll have to add the role `DrMegahertz.cloudflare` to your\nplaybook to make use of the `cloudflare_domain` task.\n\n\n### As a Git submodule\n\nIf you'd rather have all your provisioning code in one place you could also\nadd it to your playbook-repository as a [git submodule][].\nThis method doesn't require that you specify the role `DrMegahertz.cloudflare`\nin your playbook. Just use the `cloudflare_domain` task directly.\n\n    cd playbook-directory\n    mkdir vendor\n    git submodule add https://github.com/DrMegahertz/ansible-cloudflare.git vendor/ansible-cloudflare\n    mkdir library\n    ln -s vendor/ansible-cloudflare/library/cloudflare_domain.py library/cloudflare_domain.py\n\nPlaybook example\n----------------\n\nSave the following configuration into files with the specified names:\n\n**cloudflare.yaml:**\n\n    - hosts: localhost\n      connection: local\n      gather_facts: no\n      roles:\n        - DrMegahertz.cloudflare\n      tasks:\n        - name: Create DNS record www.example.com\n          cloudflare_domain: \u003e\n            state=present\n            name=www\n            zone=example.com\n            type=A\n            content=127.0.0.1\n            email=joe@example.com\n            token=77a54a4c36858cfc10321fcfce22378e19e20\n\n**hosts:**\n\n    # Dummy inventory for ansible\n    localhost\n\nThen run the playbook with the following command:\n\n    ansible-playbook -i hosts cloudflare.yaml\n\nThe email and token parameters can also be specified by setting the\n`CLOUDFLARE_API_EMAIL` and `CLOUDFLARE_API_TOKEN` environment variables.\n\n[CloudFlare Client API documentation]: https://www.cloudflare.com/docs/client-api.html\n[Ansible Galaxy]: https://galaxy.ansible.com/\n[git submodule]: http://git-scm.com/book/en/v2/Git-Tools-Submodules\n\nContributing\n------------\n\nTo install this project's dependencies using\n[PIP](https://pip.pypa.io/en/stable/), run the following command:\n\n    $ pip install -r requirements.txt\n\nTo execute the project's tests, run the following command:\n\n    $ python library/tests.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farachnys%2Fansible-cloudflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farachnys%2Fansible-cloudflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farachnys%2Fansible-cloudflare/lists"}