Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 257

Hiera hash or array error

$
0
0
I developed an AWS S3 bakcup modul, but after the latest modify, puppet client not running (for run I using a following command: puppet agent --no-daemonize --debug --onetime). My hiera.yaml: --- :backends: - yaml :yaml: :datadir: /etc/puppet/hieradata :hierarchy: - "%{hostname}" - "%{domain}" - common :merge_behavior: deeper Common.yaml awsbackupdetails: aws-region: "XYZ" aws-bucket-name: XYZ aws-access-key-id: "XYZ" aws-secret-acces-key: "XYZ" gpgkey: XYZ gpgpass: "XYZ" xyz.hostname.lan.yaml awss3backup: zurveysql: backuptype: database backuptypeselect: all backupdescription: "" /etc/puppet/manifests/servergroups/server.pp if(hiera('awss3backup')){ include backupaws $awsbackupdetails = hiera('awsbackupdetails') class { 'backupaws::credentials': aws_region => $awsbackupdetails['aws-region'], aws_bucket_name => $awsbackupdetails['aws-bucket-name'], aws_access_key_id => $awsbackupdetails['aws-access-key-id'], aws_secret_acces_key => $awsbackupdetails['aws-secret-acces-key']; 'backupaws::gnupg': gpgkey => $awsbackupdetails['gpgkey'], gpgpass => $awsbackupdetails['gpgpass']; } $awss3backup = hiera('awss3backup') create_resources('backupaws::duply', $awss3backup) } /etc/puppet/modules/backupaws/manifests/duply.pp (detail): $var = $awsbackupdetails['aws-bucket-name'] exec { "${name}_AWS_S3_Initialization": refreshonly => true, cwd => "/root/.duply/${hostname}-${name}/", command => "aws s3 cp .backupdetails.txt s3://${var}/${$hostname}/${name}/backupdetails.txt", path => '/usr/local/bin/'; } I gave a following error in puppet client: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: awsbackupdetails is not a hash or array when accessing it with aws-bucket-name at /etc/puppet/modules/backupaws/manifests/duply.pp:30 on node ntc-hun-zurveydb01.dhq.neticle.net Any idea ? Thank you!

Viewing all articles
Browse latest Browse all 257

Trending Articles