I have the following fabric task:
@task
def deploy_west_ec2_ami(name, puppetClass, size='m1.small', region='us-west-1', basedn='joe', ldap='arch-ldap-01', secret='secret', subnet='subnet-d43b8ab
d', sgroup='sg-926578fe'):
execute(deploy_ec2_ami, name='%s',puppetClass='%s',size='%s',region='%s',basedn='%s',ldap='%s',secret='%s',subnet='%s',sgroup='%s' %(name, puppetClass
, size, region, basedn, ldap, secret, subnet, sgroup))
However when I run the command:
fab deploy_west_ec2_ami:test,java
I get the following Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/fabric/main.py", line 710, in main
*args, **kwargs
File "/usr/local/lib/python2.6/dist-packages/fabric/tasks.py", line 321, in execute
results['<local-only>'] = task.run(*args, **new_kwargs)
File "/usr/local/lib/python2.6/dist-packages/fabric/tasks.py", line 113, in run
return self.wrapped(*args, **kwargs)
File "/home/bcarpio/Projects/githubenterprise/awsdeploy/fabfile.py", line 35, in deploy_west_ec2_ami
execute(deploy_ec2_ami, name='%s',puppetClass='%s',size='%s',region='%s',basedn='%s',ldap='%s',secret='%s',subnet='%s',sgroup='%s' %(name, puppetClass, size, region, basedn, ldap, secret, subnet, sgroup))
TypeError: not all arguments converted during string formatting
I am not sure I understand why. I am pretty sure I have all the values defined here just fine.
Also when I run the execute task deploy_ec2_ami as so:
deploy_ec2_ami:test,java,m1.small,us-west-1,'dc\=test\,dc\=net',ldap-01,secret,subnet-d43b8abd,sg-926578fe
It works just fine