Problems with deployment scripts

Hi all,

I’m trying to use a script I wrote to deploy machines, and configure them to work with my Puppet setup. I followed the guide on this thread: Customizing MAAS deployments with cloud-init
and following that, I wrote a test script that created a few files and installed firefox. That worked perfectly, but now that I’m trying to use something more complex I’m getting this strange error: ‘LWJpb25pYy5kZWIKI3NsZWVwIDEwCmRwa2cgLWkgcHVwcGV0Ni1yZWxlYXNlLWJpb25pYy5kZWIK’ is not a name=value or name@=filename pair

The value between the ’ ’ changes as I edit my script trying to see if there are lines in there that it disagrees with. I can’t find any real resources for this error online, and I’m starting to get frustrated. Has anyone ever encountered this error?

The error implies you are NOT sending: user_date=. e.g:

maas machine deploy <system_id> user_data=

Can you post a sample of the command you are using?

For some reason my account got locked?? I couldn’t post my response, but I think I’ve started to zero in on the problem. I have been testing line by line, and it seems that the line in my script “apt install -y puppet-agent”

In some other messing around with my script, doing
dpkg -i puppet-release-bionic.deb
apt update

works just fine, but doing

dpkg -i puppet6-release-bionic.deb
apt update
makes it fail. I really don’t get why this is happening. The more I mess around with this the more it feels like things arbitrarily cause problems. I can use commands independently of each other, but if I put them together or modify them slightly somehow something goes wrong.

The command I’m using is as follows: <maas cj machine deploy 6h6xff user_data=$user_data>

Could you please post the full script and process you are following?

Here’s the full script I’m trying to run, although I have trouble with almost every script I try to run, so I’m not really sure if this is unique to my script.

wget (it won’t let me post links so refer to the wget above)
dpkg -i puppet-release-bionic.deb
apt update -y
apt install puppet-agent -y
mv /etc/hosts /etc/hosts.bk
echo “ localhost puppetsrv
#The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts” >> /etc/hosts

mv /etc/puppetlabs/puppet/puppet.conf /etc/puppetlabs/puppet/puppet.conf.bk

echo “[main]
certname = client
server =
environment = production
runinterval = 15m” >> /etc/puppetlabs/puppet/puppet.conf

/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true

/opt/puppetlabs/bin/puppet agent --test

As for the process I’m following, I log into MaaS through the CLI, and acquire and deploy the machine following the guide in the MaaS documentation. I don’t think I’m doing anything out of the ordinary or non-standard in my process.