Closed kenthua closed 7 years ago
I'm not sure what to do about that. If you don't have the aws CLI you are missing a prereq. I suppose we could add a task to check the prereqs but... that's not really an issue with the plays or tasks...
I know it's listed as a pre-req, but if the cf-list-hosts.sh
script fails for any reason, which it did by missing not being able to execute the aws
command, the task itself should fail. What if it fails while trying to call to amazon, would the tasks still register change, which will then still fail on the generate ansible hosts file
task.
it might need an all errors fatal flag in the play.
Give it a try and see if that helps.
all errors fatal doesn't take effect because it always completes with changed regardless of error. If aws sdk is mssing or any errors within cf-list-hosts.sh
This registers as changed even when the aws cli is not installed. https://github.com/sborenst/ansible_aws_deployer/blob/master/ansible/dynamic_inventory.yml#L4-L7
Causes this to fail because it never really got the inventory. This is where I got the missing nfs variable. https://github.com/sborenst/ansible_aws_deployer/blob/master/ansible/dynamic_inventory.yml#L28-L30