|
|
@ -273,154 +273,154 @@
|
|
|
|
# ============================================================
|
|
|
|
# ============================================================
|
|
|
|
# parallel lambda creation
|
|
|
|
# parallel lambda creation
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda creation 1/4
|
|
|
|
#- name: parallel lambda creation 1/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_1"
|
|
|
|
# name: "{{lambda_function_name}}_1"
|
|
|
|
runtime: "python2.7"
|
|
|
|
# runtime: "python2.7"
|
|
|
|
handler: "mini_lambda.handler"
|
|
|
|
# handler: "mini_lambda.handler"
|
|
|
|
role: "ansible_lambda_role"
|
|
|
|
# role: "ansible_lambda_role"
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_1
|
|
|
|
# register: async_1
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda creation 2/4
|
|
|
|
#- name: parallel lambda creation 2/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_2"
|
|
|
|
# name: "{{lambda_function_name}}_2"
|
|
|
|
runtime: "python2.7"
|
|
|
|
# runtime: "python2.7"
|
|
|
|
handler: "mini_lambda.handler"
|
|
|
|
# handler: "mini_lambda.handler"
|
|
|
|
role: "ansible_lambda_role"
|
|
|
|
# role: "ansible_lambda_role"
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_2
|
|
|
|
# register: async_2
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda creation 3/4
|
|
|
|
#- name: parallel lambda creation 3/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_3"
|
|
|
|
# name: "{{lambda_function_name}}_3"
|
|
|
|
runtime: "python2.7"
|
|
|
|
# runtime: "python2.7"
|
|
|
|
handler: "mini_lambda.handler"
|
|
|
|
# handler: "mini_lambda.handler"
|
|
|
|
role: "ansible_lambda_role"
|
|
|
|
# role: "ansible_lambda_role"
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_3
|
|
|
|
# register: async_3
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda creation 4/4
|
|
|
|
#- name: parallel lambda creation 4/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_4"
|
|
|
|
# name: "{{lambda_function_name}}_4"
|
|
|
|
runtime: "python2.7"
|
|
|
|
# runtime: "python2.7"
|
|
|
|
handler: "mini_lambda.handler"
|
|
|
|
# handler: "mini_lambda.handler"
|
|
|
|
role: "ansible_lambda_role"
|
|
|
|
# role: "ansible_lambda_role"
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
register: result
|
|
|
|
# register: result
|
|
|
|
|
|
|
|
|
|
|
|
- name: assert lambda manages to respond as expected
|
|
|
|
#- name: assert lambda manages to respond as expected
|
|
|
|
assert:
|
|
|
|
# assert:
|
|
|
|
that:
|
|
|
|
# that:
|
|
|
|
- 'result is not failed'
|
|
|
|
# - 'result is not failed'
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 1
|
|
|
|
#- name: wait for async job 1
|
|
|
|
async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 2
|
|
|
|
#- name: wait for async job 2
|
|
|
|
async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 3
|
|
|
|
#- name: wait for async job 3
|
|
|
|
async_status: jid={{ async_3.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_3.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda deletion 1/4
|
|
|
|
#- name: parallel lambda deletion 1/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_1"
|
|
|
|
# name: "{{lambda_function_name}}_1"
|
|
|
|
state: absent
|
|
|
|
# state: absent
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_1
|
|
|
|
# register: async_1
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda deletion 2/4
|
|
|
|
#- name: parallel lambda deletion 2/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_2"
|
|
|
|
# name: "{{lambda_function_name}}_2"
|
|
|
|
state: absent
|
|
|
|
# state: absent
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_2
|
|
|
|
# register: async_2
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda deletion 3/4
|
|
|
|
#- name: parallel lambda deletion 3/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_3"
|
|
|
|
# name: "{{lambda_function_name}}_3"
|
|
|
|
state: absent
|
|
|
|
# state: absent
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
async: 1000
|
|
|
|
# async: 1000
|
|
|
|
register: async_3
|
|
|
|
# register: async_3
|
|
|
|
|
|
|
|
|
|
|
|
- name: parallel lambda deletion 4/4
|
|
|
|
#- name: parallel lambda deletion 4/4
|
|
|
|
lambda:
|
|
|
|
# lambda:
|
|
|
|
name: "{{lambda_function_name}}_4"
|
|
|
|
# name: "{{lambda_function_name}}_4"
|
|
|
|
state: absent
|
|
|
|
# state: absent
|
|
|
|
ec2_region: '{{ec2_region}}'
|
|
|
|
# ec2_region: '{{ec2_region}}'
|
|
|
|
ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
# ec2_access_key: '{{ec2_access_key}}'
|
|
|
|
ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
# ec2_secret_key: '{{ec2_secret_key}}'
|
|
|
|
security_token: '{{security_token}}'
|
|
|
|
# security_token: '{{security_token}}'
|
|
|
|
zip_file: "{{zip_res.dest}}"
|
|
|
|
# zip_file: "{{zip_res.dest}}"
|
|
|
|
register: result
|
|
|
|
# register: result
|
|
|
|
|
|
|
|
|
|
|
|
- name: assert lambda creation has succeeded
|
|
|
|
#- name: assert lambda creation has succeeded
|
|
|
|
assert:
|
|
|
|
# assert:
|
|
|
|
that:
|
|
|
|
# that:
|
|
|
|
- 'result is not failed'
|
|
|
|
# - 'result is not failed'
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 1
|
|
|
|
#- name: wait for async job 1
|
|
|
|
async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 2
|
|
|
|
#- name: wait for async job 2
|
|
|
|
async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_1.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for async job 3
|
|
|
|
#- name: wait for async job 3
|
|
|
|
async_status: jid={{ async_3.ansible_job_id }}
|
|
|
|
# async_status: jid={{ async_3.ansible_job_id }}
|
|
|
|
register: job_result
|
|
|
|
# register: job_result
|
|
|
|
until: job_result.finished
|
|
|
|
# until: job_result.finished
|
|
|
|
retries: 30
|
|
|
|
# retries: 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================================
|
|
|
|
# ============================================================
|
|
|
|