Skip to content

Commit

Permalink
minor code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo committed Oct 14, 2022
1 parent 0a744c7 commit 875bfd1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
1 change: 1 addition & 0 deletions plugins/modules/lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
layer_version_arn:
description:
- The ARN of the layer version.
- Mutually exclusive with I(layer_version_arn).
type: str
layer_name:
description:
Expand Down
1 change: 1 addition & 0 deletions tests/integration/targets/lambda/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dependencies:
- role: setup_botocore_pip
vars:
botocore_version: 1.21.51
- role: setup_remote_tmp_dir
19 changes: 6 additions & 13 deletions tests/integration/targets/lambda/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@

- name: Create python directory for lambda layer
file:
path: "{{ test_dir.path }}/python"
path: "{{ remote_tmp_dir }}/python"
state: directory

- name: Create lambda layer library
Expand All @@ -658,28 +658,28 @@
def hello():
print("Hello from the ansible amazon.aws lambda layer")
return 1
dest: "{{ test_dir.path }}/python/lambda_layer.py"
dest: "{{ remote_tmp_dir }}/python/lambda_layer.py"

- name: Create lambda layer archive
archive:
format: zip
path: "{{ test_dir.path }}"
dest: "{{ test_dir.path }}/lambda_layer.zip"
path: "{{ remote_tmp_dir }}"
dest: "{{ remote_tmp_dir }}/lambda_layer.zip"

- name: Create lambda layer
lambda_layer:
name: "{{ lambda_python_layers_names[0] }}"
description: '{{ lambda_python_layers_names[0] }} lambda layer'
content:
zip_file: "{{ test_dir.path }}/lambda_layer.zip"
zip_file: "{{ remote_tmp_dir }}/lambda_layer.zip"
register: first_layer

- name: Create another lambda layer
lambda_layer:
name: "{{ lambda_python_layers_names[1] }}"
description: '{{ lambda_python_layers_names[1] }} lambda layer'
content:
zip_file: "{{ test_dir.path }}/lambda_layer.zip"
zip_file: "{{ remote_tmp_dir }}/lambda_layer.zip"
register: second_layer

- name: Create lambda function with layers
Expand Down Expand Up @@ -757,13 +757,6 @@

always:

- name: Delete temporary directory
file:
state: absent
path: "{{ test_dir.path }}"
ignore_errors: true
when: test_dir is defined

- name: Delete lambda layers
lambda_layer:
name: "{{ item }}"
Expand Down

0 comments on commit 875bfd1

Please sign in to comment.