Hi,
I'm trying this :-
{
"type": "file",
"source": "./files/audit.rules",
"destination": "/tmp/audit.rules"
},
{
"type": "shell",
"inline": [
"cat /tmp/audit.rules >> /etc/audit/audit.rules"
],
"execute_command": "{{ .Vars }} sudo -E -S sh '{{ .Path }}'"
},
But when I later try to cat audit.rules (in my Jenkins groovy script, which does a terraform build using the AWS AMI created by packer).
none of the extra rules are appended to the file.
Can anyone see a reason why this would fail?
Is there a decent way to produce debug output to see what's happening?
Here's some of the packer output, with the last couple of shell scripts being the one above and then one which just starts docker.
1501747857,,ui,say,==> amazon-ebs: Uploading ./files/audit.rules => /tmp/audit.rules
1501747857,,ui,say,==> amazon-ebs: Provisioning with shell script: /tmp/packer-shell491961015
1501747857,,ui,say,==> amazon-ebs: Provisioning with shell script: /tmp/packer-shell846133939
1501747859,,ui,say,==> amazon-ebs: Stopping the source instance...
1501747860,,ui,say,==> amazon-ebs: Waiting for the instance to stop...