# Configure the powerdns backend # Enable with: # DESIGNATE_BACKEND_DRIVER=powerdns # Dependencies: # ``functions`` file # ``designate`` configuration # install_designate_backend - install any external requirements # configure_designate_backend - make configuration changes, including those to other services # init_designate_backend - initialize databases, etc. # start_designate_backend - start any external services # stop_designate_backend - stop any external services # cleanup_designate_backend - remove transient data and cache # Save trace setting DP_PDNS_XTRACE=$(set +o | grep xtrace) set +o xtrace # Defaults # -------- if is_fedora; then POWERDNS_CFG_DIR=/etc/pdns else POWERDNS_CFG_DIR=/etc/powerdns fi # Entry Points # ------------ # install_designate_backend - install any external requirements function install_designate_backend { if is_ubuntu; then PDNS=pdns-server elif is_fedora || is_suse; then PDNS=pdns else PDNS=pdns-server fi if is_service_enabled mysql; then PDNS+=" pdns-backend-mysql" elif is_service_enabled postgresql; then PDNS+=" pdns-backend-pgsql" else die $LINENO "PowerDNS backend only supports MySQL / PostgreSQL" fi install_package $PDNS sudo rm -rf $POWERDNS_CFG_DIR/pdns.d } # configure_designate_backend - make configuration changes, including those to other services function configure_designate_backend { # Generate Designate pool.yaml file sudo tee $DESIGNATE_CONF_DIR/pools.yaml > /dev/null < /dev/null < /dev/null < /dev/null <