Git Product home page Git Product logo

ansible-module-powerdns's Introduction

PowerDNS Ansible library

Usage

Zones

Ensure zone is present

- powerdns_zone:
    name: zone01.internal.example.com.
    nameservers:
    - ns-01.example.com.
    - ns-02.example.com.
    kind: master
    state: present
    pdns_host: powerdns.example.com
    pdns_port: 8081
    pdns_api_key: topsecret

Ensure zone is absent

- powerdns_zone:
    name: zone02.internal.example.com
    state: absent
    pdns_host: powerdns.example.com
    pdns_port: 8081
    pdns_api_key: topsecret

Records

Ensure A record

- powerdns_record:
    name: host01.zone01.internal.example.com.
    zone: zone01.internal.example.com
    type: A
    content: 192.168.1.234
    ttl: 1440
    pdns_host: powerdns.example.com
    pdns_port: 443
    pdns_api_key: topsecret
    pdns_prot: https

Absent all A record: this will delete all A record, even you specified ip in content

- powerdns_record:
    name: host01.zone01.internal.example.com.
    state: absent
    zone: zone01.internal.example.com
    type: A
    content: 192.168.1.234
    ttl: 1440
    pdns_host: powerdns.example.com
    pdns_port: 443
    pdns_api_key: topsecret
    pdns_prot: https

Absent particular A record: this will remove only one A record for specific ip

- powerdns_record:
    name: host01.zone01.internal.example.com.
    state: absent
    exclusive: false
    zone: zone01.internal.example.com
    type: A
    content: 192.168.1.234
    ttl: 1440
    pdns_host: powerdns.example.com
    pdns_port: 443
    pdns_api_key: topsecret
    pdns_prot: https

Ensure AAAA record

- powerdns_record:
    name: host01.zone01.internal.example.com.
    zone: zone01.internal.example.com
    type: AAAA
    content: 2001:cdba:0000:0000:0000:0000:3257:9652
    ttl: 1440
    pdns_host: powerdns.example.com
    pdns_port: 8443
    pdns_api_key: topsecret
    pdns_prot: https

Do not verify SSL certificate (this is a security risk)

- powerdns_record:
    name: host01.zone01.internal.example.com.
    zone: zone01.internal.example.com
    type: AAAA
    content: 2001:cdba:0000:0000:0000:0000:3257:9652
    ttl: 1440
    pdns_host: powerdns.example.com
    pdns_port: 8443
    pdns_api_key: topsecret
    pdns_prot: https
    strict_ssl_checking: false

Ensure CNAME record

- powerdns_record:
    name: database.zone01.internal.example.com.
    zone: zone01.internal.example.com
    type: CNAME
    content: host01.zone01.internal.example.com
    pdns_host: powerdns.example.com
    pdns_port: 80
    pdns_api_key: topsecret
    pdns_prot: http

Ensure multiple MX records

- powerdns_record:
    name: zone01.internal.example.com.
    zone: zone01.internal.example.com
    type: MX
    exclusive: no
    content: "{{ item }}"
    pdns_host: powerdns.example.com
    pdns_port: 80
    pdns_api_key: topsecret
    pdns_prot: http
  loop:
    - 10 mx1.zone01.internal.example.com
    - 10 mx2.zone01.internal.example.com

Note the trailing '.' following most records, if not present will result in the error "Domain record is not canonical".

ansible-module-powerdns's People

Contributors

blake avatar href avatar jsenecal avatar mit0223 avatar nosmoht avatar peetasan avatar rlsit avatar sizgiyaev avatar stamm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.