문제

I am having trouble getting the update procedure to fire with cloudformation. I am following the example from http://blog.kloud.com.au/2013/08/19/bootstrap-update/. I cannot seem to get the update script to fire.

 "c:\\cfn\\hooks.d\\cfn-auto-reloader.conf" : {
        "content": { "Fn::Join" : ["", [
        "[cfn-auto-reloader-hook]\n",
        "triggers=post.update\n",
"path=Resources.WindowsServer.Metadata.AWS::CloudFormation::Init\n",
        "action=",
        "powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File c:\\cfn\\deployment\\install.ps1\n"
    ]]}
},

I am trying to get the powershell script to fire when the update procedure is executed, but the log is not showing anything at all, so it seem like it is not triggering.

https://s3.amazonaws.com/Sample-Aspnet-Bootstrap/windows-server.json

도움이 되었습니까?

해결책

The problem was the update was not executing because it did not notice a change in the build. I created a simple build.txt file that held the build number. It is a little different from the example in the blog that is referenced, I created an actual file rather than just changing the metadata. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-hup.html

"AWS::CloudFormation::Init" : {
     "config" : {
        "files" : {
            "c:\\cfn\\build.txt": {
                "content" : { "Fn::Join" : ["", [
                    { "Ref" : "BuildNumber" } ]]}
             },
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top