Compare commits
No commits in common. "main" and "docs" have entirely different histories.
124
.drone.jsonnet
124
.drone.jsonnet
|
@ -1,124 +0,0 @@
|
||||||
local PipelineLinting = {
|
|
||||||
kind: 'pipeline',
|
|
||||||
name: 'linting',
|
|
||||||
platform: {
|
|
||||||
os: 'linux',
|
|
||||||
arch: 'amd64',
|
|
||||||
},
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'ansible-later',
|
|
||||||
image: 'thegeeklab/ansible-later',
|
|
||||||
commands: [
|
|
||||||
'ansible-later',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'python-format',
|
|
||||||
image: 'python:3.11',
|
|
||||||
environment: {
|
|
||||||
PY_COLORS: 1,
|
|
||||||
},
|
|
||||||
commands: [
|
|
||||||
'pip install -qq yapf',
|
|
||||||
'[ -z "$(find . -type f -name *.py)" ] || (yapf -rd ./)',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'python-flake8',
|
|
||||||
image: 'python:3.11',
|
|
||||||
environment: {
|
|
||||||
PY_COLORS: 1,
|
|
||||||
},
|
|
||||||
commands: [
|
|
||||||
'pip install -qq flake8',
|
|
||||||
'flake8',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
trigger: {
|
|
||||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
local PipelineDocumentation = {
|
|
||||||
kind: 'pipeline',
|
|
||||||
name: 'documentation',
|
|
||||||
platform: {
|
|
||||||
os: 'linux',
|
|
||||||
arch: 'amd64',
|
|
||||||
},
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'generate',
|
|
||||||
image: 'thegeeklab/ansible-doctor',
|
|
||||||
environment: {
|
|
||||||
ANSIBLE_DOCTOR_LOG_LEVEL: 'INFO',
|
|
||||||
ANSIBLE_DOCTOR_FORCE_OVERWRITE: true,
|
|
||||||
ANSIBLE_DOCTOR_EXCLUDE_FILES: 'molecule/',
|
|
||||||
ANSIBLE_DOCTOR_TEMPLATE: 'hugo-book',
|
|
||||||
ANSIBLE_DOCTOR_ROLE_NAME: '${DRONE_REPO_NAME#*.}',
|
|
||||||
ANSIBLE_DOCTOR_OUTPUT_DIR: '_docs/',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'publish',
|
|
||||||
image: 'plugins/gh-pages',
|
|
||||||
settings: {
|
|
||||||
remote_url: 'https://gitea.rknet.org/ansible/${DRONE_REPO_NAME}',
|
|
||||||
netrc_machine: 'gitea.rknet.org',
|
|
||||||
username: { from_secret: 'gitea_username' },
|
|
||||||
password: { from_secret: 'gitea_token' },
|
|
||||||
pages_directory: '_docs/',
|
|
||||||
target_branch: 'docs',
|
|
||||||
},
|
|
||||||
when: {
|
|
||||||
ref: ['refs/heads/main'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
trigger: {
|
|
||||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
|
||||||
},
|
|
||||||
depends_on: [
|
|
||||||
'linting',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
local PipelineNotification = {
|
|
||||||
kind: 'pipeline',
|
|
||||||
name: 'notification',
|
|
||||||
platform: {
|
|
||||||
os: 'linux',
|
|
||||||
arch: 'amd64',
|
|
||||||
},
|
|
||||||
clone: {
|
|
||||||
disable: true,
|
|
||||||
},
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'matrix',
|
|
||||||
image: 'thegeeklab/drone-matrix',
|
|
||||||
settings: {
|
|
||||||
homeserver: { from_secret: 'matrix_homeserver' },
|
|
||||||
roomid: { from_secret: 'matrix_roomid' },
|
|
||||||
template: 'Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}',
|
|
||||||
username: { from_secret: 'matrix_username' },
|
|
||||||
password: { from_secret: 'matrix_password' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
depends_on: [
|
|
||||||
'documentation',
|
|
||||||
],
|
|
||||||
trigger: {
|
|
||||||
status: ['success', 'failure'],
|
|
||||||
ref: ['refs/heads/main', 'refs/tags/**'],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
[
|
|
||||||
PipelineLinting,
|
|
||||||
PipelineDocumentation,
|
|
||||||
PipelineNotification,
|
|
||||||
]
|
|
120
.drone.yml
120
.drone.yml
|
@ -1,120 +0,0 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: linting
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: ansible-later
|
|
||||||
image: thegeeklab/ansible-later
|
|
||||||
commands:
|
|
||||||
- ansible-later
|
|
||||||
|
|
||||||
- name: python-format
|
|
||||||
image: python:3.11
|
|
||||||
commands:
|
|
||||||
- pip install -qq yapf
|
|
||||||
- "[ -z \"$(find . -type f -name *.py)\" ] || (yapf -rd ./)"
|
|
||||||
environment:
|
|
||||||
PY_COLORS: 1
|
|
||||||
|
|
||||||
- name: python-flake8
|
|
||||||
image: python:3.11
|
|
||||||
commands:
|
|
||||||
- pip install -qq flake8
|
|
||||||
- flake8
|
|
||||||
environment:
|
|
||||||
PY_COLORS: 1
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
- refs/pull/**
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: documentation
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: generate
|
|
||||||
image: thegeeklab/ansible-doctor
|
|
||||||
environment:
|
|
||||||
ANSIBLE_DOCTOR_EXCLUDE_FILES: molecule/
|
|
||||||
ANSIBLE_DOCTOR_FORCE_OVERWRITE: true
|
|
||||||
ANSIBLE_DOCTOR_LOG_LEVEL: INFO
|
|
||||||
ANSIBLE_DOCTOR_OUTPUT_DIR: _docs/
|
|
||||||
ANSIBLE_DOCTOR_ROLE_NAME: ${DRONE_REPO_NAME#*.}
|
|
||||||
ANSIBLE_DOCTOR_TEMPLATE: hugo-book
|
|
||||||
|
|
||||||
- name: publish
|
|
||||||
image: plugins/gh-pages
|
|
||||||
settings:
|
|
||||||
netrc_machine: gitea.rknet.org
|
|
||||||
pages_directory: _docs/
|
|
||||||
password:
|
|
||||||
from_secret: gitea_token
|
|
||||||
remote_url: https://gitea.rknet.org/ansible/${DRONE_REPO_NAME}
|
|
||||||
target_branch: docs
|
|
||||||
username:
|
|
||||||
from_secret: gitea_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
- refs/pull/**
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linting
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: notification
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: matrix
|
|
||||||
image: thegeeklab/drone-matrix
|
|
||||||
settings:
|
|
||||||
homeserver:
|
|
||||||
from_secret: matrix_homeserver
|
|
||||||
password:
|
|
||||||
from_secret: matrix_password
|
|
||||||
roomid:
|
|
||||||
from_secret: matrix_roomid
|
|
||||||
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
|
|
||||||
username:
|
|
||||||
from_secret: matrix_username
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- documentation
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: signature
|
|
||||||
hmac: c3dca934e69781f037b543747fd2f49dc6316a67ccda46a2bdaabf6e634aabce
|
|
||||||
|
|
||||||
...
|
|
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,13 +0,0 @@
|
||||||
# ---> Ansible
|
|
||||||
*.retry
|
|
||||||
plugins
|
|
||||||
library
|
|
||||||
|
|
||||||
# ---> Python
|
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
|
|
||||||
# ---> Docs
|
|
||||||
/_docs
|
|
17
.later.yml
17
.later.yml
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
ansible:
|
|
||||||
custom_modules:
|
|
||||||
- iptables_raw
|
|
||||||
- openssl_pkcs12
|
|
||||||
- proxmox_kvm
|
|
||||||
- ucr
|
|
||||||
|
|
||||||
rules:
|
|
||||||
exclude_files:
|
|
||||||
- molecule/
|
|
||||||
- "LICENSE*"
|
|
||||||
- "**/*.md"
|
|
||||||
- "**/*.ini"
|
|
||||||
|
|
||||||
exclude_filter:
|
|
||||||
- LINT0009
|
|
21
LICENSE
21
LICENSE
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
|
||||||
to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
||||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
||||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
README.md
10
README.md
|
@ -1,10 +0,0 @@
|
||||||
# xoxys.cloudflare_dns
|
|
||||||
|
|
||||||
[![Build Status](https://img.shields.io/drone/build/ansible/xoxys.cloudflare_dns?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.cloudflare_dns)
|
|
||||||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](LICENSE)
|
|
||||||
|
|
||||||
Manage DNS records on cloudflare. You can find the full documentation at [https://galaxy.geekdocs.de](https://galaxy.geekdocs.de/roles/cloud/cloudflare_dns/).
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
# @var cloudflare_dns_api_token:description: Account API password.
|
|
||||||
# @var cloudflare_dns_api_token: $ "_unset_"
|
|
||||||
|
|
||||||
# @var cloudflare_dns_default_zone: Define a default DNS zone to use
|
|
||||||
# if no zone is given for an individual record.
|
|
||||||
# @end
|
|
||||||
# @var cloudflare_dns_default_zone: $ "_unset_"
|
|
||||||
|
|
||||||
cloudflare_dns_delegate_to: localhost
|
|
||||||
|
|
||||||
# @var cloudflare_dns_records:example: >
|
|
||||||
# cloudflare_dns_records:
|
|
||||||
# - record: test
|
|
||||||
# type: A
|
|
||||||
# value: 127.0.0.1
|
|
||||||
# zone: example.com
|
|
||||||
# solo: no
|
|
||||||
# state: present
|
|
||||||
# @end
|
|
||||||
cloudflare_dns_records: []
|
|
||||||
cloudflare_dns_records_extra: []
|
|
82
index.md
Normal file
82
index.md
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
---
|
||||||
|
title: cloudflare_dns
|
||||||
|
type: docs
|
||||||
|
---
|
||||||
|
|
||||||
|
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.cloudflare_dns) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.cloudflare_dns?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.cloudflare_dns) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.cloudflare_dns/src/branch/main/LICENSE)
|
||||||
|
|
||||||
|
Manage DNS records on cloudflare.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
- [Default Variables](#default-variables)
|
||||||
|
- [cloudflare_dns_api_token](#cloudflare_dns_api_token)
|
||||||
|
- [cloudflare_dns_default_zone](#cloudflare_dns_default_zone)
|
||||||
|
- [cloudflare_dns_delegate_to](#cloudflare_dns_delegate_to)
|
||||||
|
- [cloudflare_dns_records](#cloudflare_dns_records)
|
||||||
|
- [cloudflare_dns_records_extra](#cloudflare_dns_records_extra)
|
||||||
|
- [Dependencies](#dependencies)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Default Variables
|
||||||
|
|
||||||
|
### cloudflare_dns_api_token
|
||||||
|
|
||||||
|
Account API password.
|
||||||
|
|
||||||
|
#### Default value
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_api_token: _unset_
|
||||||
|
```
|
||||||
|
|
||||||
|
### cloudflare_dns_default_zone
|
||||||
|
|
||||||
|
#### Default value
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_default_zone: _unset_
|
||||||
|
```
|
||||||
|
|
||||||
|
### cloudflare_dns_delegate_to
|
||||||
|
|
||||||
|
#### Default value
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_delegate_to: localhost
|
||||||
|
```
|
||||||
|
|
||||||
|
### cloudflare_dns_records
|
||||||
|
|
||||||
|
#### Default value
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_records: []
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example usage
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_records:
|
||||||
|
- record: test
|
||||||
|
type: A
|
||||||
|
value: 127.0.0.1
|
||||||
|
zone: example.com
|
||||||
|
solo: no
|
||||||
|
state: present
|
||||||
|
```
|
||||||
|
|
||||||
|
### cloudflare_dns_records_extra
|
||||||
|
|
||||||
|
#### Default value
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
cloudflare_dns_records_extra: []
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
None.
|
|
@ -1,26 +0,0 @@
|
||||||
# Standards: 0.2
|
|
||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
# @meta author:value: [Robert Kaussow](https://gitea.rknet.org/xoxys)
|
|
||||||
author: "Robert Kaussow <mail@thegeeklab.de>"
|
|
||||||
namespace: xoxys
|
|
||||||
role_name: cloudflare_dns
|
|
||||||
# @meta description: >
|
|
||||||
# [![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.cloudflare_dns)
|
|
||||||
# [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.cloudflare_dns?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.cloudflare_dns)
|
|
||||||
# [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.cloudflare_dns/src/branch/main/LICENSE)
|
|
||||||
#
|
|
||||||
# Manage DNS records on cloudflare.
|
|
||||||
# @end
|
|
||||||
description: Manage DNS records on cloudflare
|
|
||||||
license: MIT
|
|
||||||
min_ansible_version: 2.10
|
|
||||||
platforms:
|
|
||||||
- name: EL
|
|
||||||
versions:
|
|
||||||
- 7
|
|
||||||
galaxy_tags: []
|
|
||||||
dependencies: []
|
|
||||||
collections:
|
|
||||||
- xoxys.general
|
|
||||||
- community.general
|
|
12
setup.cfg
12
setup.cfg
|
@ -1,12 +0,0 @@
|
||||||
[flake8]
|
|
||||||
ignore = D100, D101, D102, D103, D105, D107, E402, W503
|
|
||||||
max-line-length = 99
|
|
||||||
inline-quotes = double
|
|
||||||
exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env*
|
|
||||||
|
|
||||||
[yapf]
|
|
||||||
based_on_style = google
|
|
||||||
column_limit = 99
|
|
||||||
dedent_closing_brackets = true
|
|
||||||
coalesce_brackets = true
|
|
||||||
split_before_logical_operator = true
|
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
- include_tasks: setup.yml
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create DNS records
|
|
||||||
cloudflare_dns:
|
|
||||||
api_token: "{{ cloudflare_dns_api_token }}"
|
|
||||||
zone: "{{ item.zone | default(cloudflare_dns_default_zone) }}"
|
|
||||||
record: "{{ item.record | default(omit) }}"
|
|
||||||
type: "{{ item.type | default(omit) }}"
|
|
||||||
solo: "{{ item.solo | default(omit) }}"
|
|
||||||
value: "{{ item.value | default(omit) }}"
|
|
||||||
state: "{{ item.state | default('present') }}"
|
|
||||||
loop: "{{ cloudflare_dns_records + cloudflare_dns_records_extra }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.zone | default(cloudflare_dns_default_zone) }}:{{ item.record | default('@') }}"
|
|
||||||
delegate_to: "{{ cloudflare_dns_delegate_to }}"
|
|
Loading…
Reference in New Issue
Block a user