from .xlate import __mo_file__ as __xlate_mo_file__
from .xlate import XLATOR, LOCALE_DIR, DOMAIN
-__version__ = '1.2.1'
+__version__ = '1.3.1'
LOG = logging.getLogger(__name__)
SIGNAL_NAMES = {
# PowerDNS options
pdns_group = self.arg_parser.add_argument_group(_('PowerDNS options'))
+ pdns_group.add_argument(
+ '--no-pdns', action="store_true", dest='no_pdns',
+ help=_(
+ "Don't execute any PowerDNS checks or actions. In this case it's on yours "
+ "to ensure existence of all necessary IP addresses.")
+ )
+
pdns_group.add_argument(
'-M', '--pdns-master', metavar=_("HOST"), dest='pdns_master',
help=_(
# -------------------------------------------------------------------------
def perform_arg_parser_pdns(self):
+ if self.args.no_pdns:
+ self.config.no_pdns = True
if self.args.pdns_master:
self.config.pdns_master_server = self.args.pdns_master
if self.args.pdns_api_port:
from .xlate import XLATOR
-__version__ = '1.5.3'
+__version__ = '1.6.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
self.puppetca = self.default_puppetca
self.pdns_comment_account = self.default_pdns_comment_account
+ self._no_pdns = False
+
self.puppet_envs_add = set()
self.puppet_envs_delete = set()
def simulate(self, value):
self._simulate = to_bool(value)
+ # -----------------------------------------------------------
+ @property
+ def no_pdns(self):
+ """Don't execute some PowerDNS actions or checks."""
+ return self._no_pdns
+
+ @no_pdns.setter
+ def no_pdns(self, value):
+ self._no_pdns = to_bool(value)
+
# -----------------------------------------------------------
@property
def pdns_api_key(self):
res = super(CrTfConfiguration, self).as_dict(short=short)
res['simulate'] = self.simulate
+ res['no_pdns'] = self.no_pdns
res['pdns_api_use_https'] = self.pdns_api_use_https
res['pdns_api_timeout'] = self.pdns_api_timeout
res['vm_root_password'] = None
from .xlate import XLATOR
-__version__ = '3.7.3'
+__version__ = '3.8.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
simulate=self.simulate, force=self.force, initialized=True,
)
- try:
- api_version = self.pdns.get_api_server_version() # noqa
- except (PowerDNSHandlerError, ConnectionError) as e:
- msg = "{c}: {e}".format(c=e.__class__.__name__, e=str(e))
- raise ExpectedHandlerError(msg)
+ if not self.config.no_pdns:
+ try:
+ api_version = self.pdns.get_api_server_version() # noqa
+ except (PowerDNSHandlerError, ConnectionError) as e:
+ msg = "{c}: {e}".format(c=e.__class__.__name__, e=str(e))
+ raise ExpectedHandlerError(msg)
# -------------------------------------------------------------------------
def check_terraform_version(self):
# -------------------------------------------------------------------------ยท
def exec_pdns_zones(self):
+ if self.config.no_pdns:
+ return
+
if self.stop_at_step == 'pdns-zones':
self.incr_verbosity()
# --------------------------------------------------------------------------
def perform_dns(self):
+ if self.config.no_pdns:
+ LOG.debug(_("Power DNS actions are not eceuted."))
+ return
+
print()
LOG.info(_("Performing DNS actions ..."))
print()