libraries/dynadns.rb
#
# Fetch all keys this node requests
#
# @return [Hash] of key-names containing bag data for each key
#
Fetch all keys this node requests
Fetch all keys this node requests
def keys
        k ||= {}
        @zones ||= load_zones
        return if @zones.nil? || @zones.empty?
        if node.key?(:dns) && node['dns'].key?(:rndc_key)
          default_key = node['dns']['rndc_key']
          k[default_key] = get_key(default_key)
        end
        @zones.each { |zone| k[zone['rndc_key']] = get_key zone['rndc_key'] if zone.key? 'rndc_key' }
        k
      end
def keys k ||= { } @zones ||= load_zones return if @zones . nil? || @zones . empty? if node . key? ( :dns ) && node [ 'dns' ] . key? ( :rndc_key ) default_key = node [ 'dns' ] [ 'rndc_key' ] k [ default_key ] = get_key ( default_key ) end @zones . each { | zone | k [ zone [ 'rndc_key' ] ] = get_key zone [ 'rndc_key' ] if zone . key? 'rndc_key' } k end
Fetch all keys this node requests
Fetch all keys this node requests
# global default keys if they exist # TODO: need to work out the namespace on dns stuff here. # TODO: be good to support knife-vault/encrypted bags for keys
of key-names containing bag data for each key
of key - names containing bag data for each key
Hash