This repository was archived by the owner on Oct 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
SG-creation-update #2605
Merged
Merged
SG-creation-update #2605
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a219b2b
SG-creation-update
4b67c78
Updating-lambda-tasks-to-handle-various-file-options
ed190a9
Updating-lambda-tasks-for-url-handling
0da211c
Updating-aws_admin_tools-for-aws_lambda
7750b30
Updating-aws_admin_tools-for-aws_lambda
fb09c61
Setting-loop-item
9683dc4
Setting-loop-item-2
4028ef7
Updating-vpc-sec-group-vars
c231a31
Removing-extra-vars-for-git-module
b8556a0
Adding-default-for-git_url
859df47
Cleaning-up-tasks
c07415a
Updating-ansible-lint
684be6f
Updating-ansible-lint
05c0cb1
Ommiting-name-if-no-sec_group-name-defined
ea251be
Removing-loop-var
5acd496
Merge branch '2.x' into SG-creation-update-PR-2.x
matej5 e2f7035
Merge branch '2.x' into SG-creation-update-PR-2.x
matej5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
roles/aws/aws_admin_tools/templates/api_change_asg_scaling.py.j2
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
roles/aws/aws_admin_tools/templates/api_get_acl_list.py.j2
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
roles/aws/aws_admin_tools/templates/api_get_forecasted_costs.py.j2
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
roles/aws/aws_admin_tools/templates/api_update_ip_set.py.j2
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| - name: Check and clean previous Lambda function. | ||
| ansible.builtin.file: | ||
| path: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.py" | ||
| state: absent | ||
|
|
||
| - name: Write Lambda function. | ||
| ansible.builtin.copy: | ||
| content: "{{ aws_lambda.function_file }}" | ||
| dest: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.py" | ||
|
|
||
| - name: Create a zip archive of Lambda function. | ||
| community.general.archive: | ||
| path: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.py" | ||
| dest: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.zip" | ||
| format: zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| - name: Clone git repo. | ||
| ansible.builtin.git: | ||
| repo: "{{ aws_lambda.function_file }}" | ||
| dest: /tmp/funct | ||
|
|
||
| - name: Find all .j2 template files. | ||
| ansible.builtin.find: | ||
| paths: "{{ work_dir }}/{{ repo_name }}" | ||
| patterns: "*.j2" | ||
| recurse: true | ||
| register: _j2_files | ||
|
|
||
| - name: Template all .j2 files. | ||
| ansible.builtin.template: | ||
| src: "{{ item.path }}" | ||
| dest: "{{ item.path | regex_replace('\\.j2$', '') }}" | ||
| loop: "{{ _j2_files.files }}" | ||
| loop_control: | ||
| label: "{{ item.path }}" | ||
|
|
||
| - name: Remove original .j2 files after templating. | ||
| ansible.builtin.file: | ||
| path: "{{ item.path }}" | ||
| state: absent | ||
| loop: "{{ _j2_files.files }}" | ||
| loop_control: | ||
| label: "{{ item.path }}" | ||
|
|
||
| - name: Copy a zip archive of Lambda function. | ||
| community.general.archive: | ||
| path: "/tmp/funct" | ||
| dest: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.zip" | ||
| format: zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| - name: Copy a zip archive of Lambda function. | ||
| ansible.builtin.copy: | ||
| src: "{{ aws_lambda.function_file }}" | ||
| dest: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.zip" | ||
| owner: controller | ||
| group: controller | ||
| mode: '0644' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is here, so it will always be defined (even if the client repo separately sets an empty value "", and '| trim | default(omit)' is not used after it). So the conditions that rely on it will always be true (or false, if 'when: not defined').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just default value so we have example what to use (domain and function name doesn't exist) and the actual values are defined in ce-provision-config
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the task below, which have this condition:
when: item.git_url is not defined
will never be executed, because git_url IS always defined if you set defaults :)