mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
pep-8 fix
This commit is contained in:
parent
6a96be86b6
commit
0dd50bba21
@ -215,7 +215,7 @@ def create(vm_):
|
|||||||
if saltcloud.utils.wait_for_passwd(host=ip_address, username=user, timeout=60, key_filename=__opts__['AWS.private_key']):
|
if saltcloud.utils.wait_for_passwd(host=ip_address, username=user, timeout=60, key_filename=__opts__['AWS.private_key']):
|
||||||
username = user
|
username = user
|
||||||
break
|
break
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
deploy_command='bash /tmp/deploy.sh'
|
deploy_command='bash /tmp/deploy.sh'
|
||||||
if username == 'root':
|
if username == 'root':
|
||||||
deploy_command='/tmp/deploy.sh'
|
deploy_command='/tmp/deploy.sh'
|
||||||
|
@ -95,7 +95,7 @@ def create(vm_):
|
|||||||
sys.stderr.write(err)
|
sys.stderr.write(err)
|
||||||
log.error(err)
|
log.error(err)
|
||||||
return False
|
return False
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
deployed = saltcloud.utils.deploy_script(
|
deployed = saltcloud.utils.deploy_script(
|
||||||
host=data.public_ips[0],
|
host=data.public_ips[0],
|
||||||
username='root',
|
username='root',
|
||||||
|
@ -128,7 +128,7 @@ def create(vm_):
|
|||||||
not_ready = False
|
not_ready = False
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
|
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
log.debug('Deploying {0} using IP address {1}'.format(vm_['name'], data.public_ips[0]))
|
log.debug('Deploying {0} using IP address {1}'.format(vm_['name'], data.public_ips[0]))
|
||||||
deployed = saltcloud.utils.deploy_script(
|
deployed = saltcloud.utils.deploy_script(
|
||||||
host=data.public_ips[0],
|
host=data.public_ips[0],
|
||||||
|
@ -93,7 +93,7 @@ def create(vm_):
|
|||||||
)
|
)
|
||||||
log.error(err)
|
log.error(err)
|
||||||
return False
|
return False
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
if saltcloud.utils.wait_for_ssh(data.public_ips[0]):
|
if saltcloud.utils.wait_for_ssh(data.public_ips[0]):
|
||||||
cmd = ('ssh -oStrictHostKeyChecking=no -t -i {0} {1}@{2} '
|
cmd = ('ssh -oStrictHostKeyChecking=no -t -i {0} {1}@{2} '
|
||||||
'"{3}"').format(
|
'"{3}"').format(
|
||||||
|
@ -118,7 +118,7 @@ def create(vm_):
|
|||||||
log.error(err)
|
log.error(err)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
deployed = saltcloud.utils.deploy_script(
|
deployed = saltcloud.utils.deploy_script(
|
||||||
host=data.public_ips[0],
|
host=data.public_ips[0],
|
||||||
username='root',
|
username='root',
|
||||||
|
@ -239,7 +239,7 @@ def create(vm_):
|
|||||||
deployargs['sudo'] = vm_['sudo']
|
deployargs['sudo'] = vm_['sudo']
|
||||||
log.debug('Running root commands using sudo')
|
log.debug('Running root commands using sudo')
|
||||||
|
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
deployed = saltcloud.utils.deploy_script(**deployargs)
|
deployed = saltcloud.utils.deploy_script(**deployargs)
|
||||||
if deployed:
|
if deployed:
|
||||||
log.info('Salt installed on {0}'.format(vm_['name']))
|
log.info('Salt installed on {0}'.format(vm_['name']))
|
||||||
|
@ -162,7 +162,7 @@ def create(vm_):
|
|||||||
if not ip_address:
|
if not ip_address:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if __opts__['deploy'] == True:
|
if __opts__['deploy'] is True:
|
||||||
deployed = saltcloud.utils.deploy_script(
|
deployed = saltcloud.utils.deploy_script(
|
||||||
host=ip_address,
|
host=ip_address,
|
||||||
username='root',
|
username='root',
|
||||||
|
Loading…
Reference in New Issue
Block a user