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/CALz9Rt9JrWnxBmD-%3D%2BYOBKtF2GJ7XLUxHbSJwdP2vd17t3nGLQ%40mail.gmail.com.

Reply via email to