manicminer / ansible-auto-scaling-tutorial

Ansible EC2 Auto Scaling Tutorial
Other
220 stars 111 forks source link

failure with lc_find #7

Open dhgrainger opened 8 years ago

dhgrainger commented 8 years ago

First of all I really like this playbook, it's a really great tutorial. The one issue I have is when I try to run the custom module lc_find. I am passing the

ESTABLISH LOCAL CONNECTION FOR USER: douggrainger localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085 )" ) localhost PUT /var/folders/y_/nxy2vpcs3d5_jztrfg2sn8t00000gn/T/tmpBgwMXq TO /Users/douggrainger/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085/lc_find localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /Users/douggrainger/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085/lc_find; rm -rf "/Users/douggrainger/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085/" > /dev/null 2>&1 fatal: [172.16.1.44 -> localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "lc_find"}, "module_stderr": "\nUnknown output type: None\nTraceback (most recent call last):\n File \"/Users/douggrainger/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085/lc_find\", line 2219, in \n main()\n File \"/Users/douggrainger/.ansible/tmp/ansible-tmp-1458078036.19-221905393396085/lc_find\", line 31, in main\n lc_cmd_result = subprocess.check_output([\"aws\", \"autoscaling\", \"describe-launch-configurations\", \"--region\", module.params.get('region')])\n File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py\", line 573, in check_output\n raise CalledProcessError(retcode, cmd, output=output)\nsubprocess.CalledProcessError: Command '['aws', 'autoscaling', 'describe-launch-configurations', '--region', 'us-east-1']' returned non-zero exit status 255\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}.

These are the parameters i'm passing

manicminer commented 8 years ago

@dhgrainger Thanks for the error report. Are you sure that you have the aws command installed on your Ansible control host? You can get it on most distributions by running:

[sudo] pip install awscli

We have a new version of this module that uses native Python APIs to search for launch configurations instead of a command line subprocess - I'll update this repo sometime soon with the newer module.