I'm trying to install crontab on an AMI image using the shell provisioner
like this:
{
"type": "shell",
"skip_clean": true,
"inline": [
"some commands above and here and then..",
"(crontab -l 2> /dev/null; echo '0 03 * * *
/home/ec2-user/cron/some-script.sh') | crontab -"
]
}
SSH username in the builder is set to *ec2-user*. The problem is that when
I create an instance from the image and log in I cannot see any cron
installed by checking with *crontab -l*. However when I keep the script on
the image by setting *skip_clean* to *true* and execute the script again
manually (as ec2-user) then the cron entry is set up. That seems strange to
me, because all other commands in the inline sections execute just fine.
Any thoughts please?
Thanks,
Stan
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/a630d63d-e6b2-4f93-96c2-d319f5ff1163%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.