Please excuse my ignorance I am new to using Packer. To be brief I think I may be doing this wrong or my syntax is wrong or both.
In any event, first off, aside from the documentation, can anyone recommend to me some packer provisioner examples?
I am currently running a Packer build against our VMware environment to roll out CentOS-7.6 images.
I am particularly interested in the provisioners section to do some post software installs and also add some lines to some configuration files. And is it safe to assume that this is the section where I would execute shell commands?
I am running into an issue when I run this “shell” command inline, and maybe is inline is wrong. I want to simply add a line to /etc/sudoers to add a Windows AD group. Real information omitted. There is other stuff I want to do especially with config files, but this is an example that is failing for me.
The section looks like this:
“echo %Domain\Group ALL=(ALL) ALL >> /etc/sudoers”
I am getting some end of statement error, don’t have it now will have to reproduce.
Is my thinking correct if I want to run any shell command whether its a yum install or a simple one liner add to config file, do I do in the type: shell, inline:?
I’ve looked around on git and across the interwebs and I am seeing various different way to do this, some put an “execute command” in there along with the inline.
Again, I am new to Packer have mercy on me. Any help would be appreciated. Thankls.