Whooopsie.
I had some echo shell inline commands in prior task for verbosity that got
interpreted as an actual command.
self-sabotage achieved again.
thanks all.
On Wednesday, May 20, 2020 at 9:35:06 AM UTC-4, trey perrone wrote:
>
> my commands are all lowercase as my samples show. when i saw the REBOOT
> error i tried other options with `shutdown` or even systemctl commands
> thinking it was something with the bash inline shell or even the example
> for direct path to /usr/sbin/{reboot..shutdown}
>
> will have to play with amazon linux 2 (also rhel based) and also ubuntu 16
> and see if its same issue.
>
> On Wednesday, May 20, 2020 at 5:02:45 AM UTC-4, Rickard von Essen wrote:
>>
>> Looks like the word reboot got uppercased?
>>
>> On Wed, May 20, 2020, 03:33 trey perrone <[email protected]> wrote:
>>
>>> Attempting to add an inline reboot command based on this
>>> https://discuss.hashicorp.com/t/best-practice-for-applying-updates-and-kernel-patches/3300/2
>>> but
>>> playing around today to build new AWS AMIs, I seem to get errors. This is
>>> also sort of documented on packer.io
>>> https://www.packer.io/docs/provisioners/shell/#handling-reboots. I was
>>> trying to do inline to keep it simply
>>>
>>> I am mainly trying to add the reboot as trying to get kernel and
>>> associated packages up to date prior to installing this awful Symantec
>>> Endpoint agent that was thrust upon me from above. It compiles some
>>> autoprotect feature based on the kernel, so want to update my kernel and
>>> associated pacakges first, inline reboot, then proceed with ansible
>>> playbooks that include the Symantec agent and thus at least i can ensure
>>> the base AMI kernel is functioning ok at build/install.
>>>
>>>
>>> - packer 1.5.5 is what I am currently using
>>> - I was testing redhat7 and centos7 today
>>>
>>>
>>>
>>> {
>>> "type": "shell",
>>> "inline": "sudo reboot",
>>> "expect_disconnect": true,
>>> "pause_before": "30s",
>>> "timeout": "5m"
>>> },
>>>
>>>
>>>
>>> Ive tried variations of commands
>>>
>>> - putting my inline in [ ] for array
>>> - sudo shutdown -now
>>> - sudo /usr/sbin/reboot (or shutdown)
>>> - sudo systemctl reboot
>>>
>>> but packer always throws an error similar to
>>>
>>> amazon-ebs: /tmp/script_5489.sh: line 16: REBOOT: command not found
>>> amazon-ebs: /tmp/script_5489.sh: line 16: REBOOT: command not found
>>>
>>>
>>> What am I overlooking in the docs here?
>>>
>>>
>>>
>>> --
>>> 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/hashicorp/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/41d9f7b5-d18c-4e76-9ae4-10beefe5001a%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/packer-tool/41d9f7b5-d18c-4e76-9ae4-10beefe5001a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
--
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/hashicorp/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/49a84ccb-f878-4fb8-9b9c-9bd17be35816%40googlegroups.com.