Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5071736
Merge pull request #2654 from codeenigma/Gitlab-stop-fix-PR-2.x
drazenCE Sep 2, 2025
a8ba8e4
Fixing-email-title-for-backup-validation (#2657)
matej5 Sep 4, 2025
057138d
Adding-task-to-create-aurora-cluster (#2659)
matej5 Sep 8, 2025
2b30a78
Fixing truthy variable mistakes. (#2662)
gregharvey Sep 10, 2025
cb63668
feat(php): Add FPM slow logrotate (#2625)
klausi Sep 10, 2025
9f05b90
r73458-install-php-gmp-by-default2 (#2667)
nfawbert Sep 10, 2025
a89ae45
Wazuh-mitre-report-setup (#2588)
drazenCE Sep 11, 2025
71278e9
Wazuh mitre report setup pr 2.x (#2669)
drazenCE Sep 11, 2025
65a6a0d
pin_ansible_version (#2671)
tymofiisobchenko Sep 12, 2025
854a245
Fixing-ce-provision-vars (#2678)
drazenCE Sep 16, 2025
1850230
Updating-string (#2507)
matej5 Sep 17, 2025
d62d4e6
Added-tasks-to-backup-Aurora-and-copy-AMI-to-safe-region (#2682)
matej5 Sep 18, 2025
6717286
SG-creation-update (#2605)
matej5 Sep 18, 2025
3bcee17
Fixing-copy-AMI-to-backup-region (#2684)
matej5 Sep 18, 2025
7bd773f
Fixing-ami-copy-task (#2686)
matej5 Sep 19, 2025
d76c96e
Fixing-aws_vpc-override
Sep 22, 2025
1ae591b
Resolving-conflicts
Sep 22, 2025
6d74d0d
Adding-defaults
Sep 22, 2025
254a719
Merge branch 'Fixing-aws_vpc-override' into Fixing-aws_vpc-override-P…
Sep 22, 2025
0ed9cb5
Fixing-register-command
Sep 22, 2025
e0b91a7
Defaulting-tags
Sep 22, 2025
d046e45
Defaulting-tags-2
Sep 22, 2025
0b220f3
Updating-region
Sep 22, 2025
d26b62e
Updating-iam_role-vars
Sep 22, 2025
bbddd0c
Updating-iam_role-vars-2
Sep 22, 2025
42b49e5
Updating-when-statement
Sep 22, 2025
c28e20e
Updating-when-statement-for-backups
Sep 22, 2025
065fcc6
Updating-when-statement-for-iam-policy
Sep 22, 2025
40c25d9
Updating-when-statement-for-iam-policy
Sep 22, 2025
abf8097
Reverting-wazuh-changes
Sep 22, 2025
be82ee9
Updating-vars-for-SG-creation
Sep 22, 2025
65e9412
Updating-when-statement-for-iam-role
Sep 23, 2025
ef6be3c
Updating-handle-git-url
Sep 23, 2025
08d107e
Updating-handle-git-url-2
Sep 23, 2025
783f4a2
Updating-handle-git-url-3
Sep 23, 2025
c4599ed
Updating-handle-git-url-4
Sep 23, 2025
f7cc96c
Updating-handle-git-url-5
Sep 23, 2025
2466295
Updating-handle-git-url-6
Sep 23, 2025
b0c397a
Updating-handle-git-url-7
Sep 24, 2025
9185621
Merge branch 'devel-2.x' into Fixing-aws_vpc-override-PR-devel-2.x
matej5 Sep 24, 2025
2906687
Updating-task
Sep 24, 2025
0c126da
Fixing-tasks
Sep 24, 2025
cdb7bb7
Merge branch 'devel-2.x' into Fixing-aws_vpc-override-PR-devel-2.x
matej5 Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/aws/aws_ami/tasks/repack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name: aws/aws_vpc
tasks_from: security_group
vars:
aws_vpc:
aws_vpc_sg:
profile: "{{ aws_ami.aws_profile }}"
region: "{{ aws_ami.region }}"
name: "{{ aws_ami.repack.cluster_name }}-repacker"
Expand Down
2 changes: 1 addition & 1 deletion roles/aws/aws_backup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
with_items: "{{ aws_backup.plans }}"
loop_control:
loop_var: plan
when: aws_backup.plans | length
when: aws_backup.plans | length > 0

- name: Include aws backup validation role.
ansible.builtin.include_role:
Expand Down
4 changes: 2 additions & 2 deletions roles/aws/aws_backup_validation/tasks/testing_resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
name: aws/aws_vpc
tasks_from: security_group
vars:
aws_vpc:
aws_vpc_sg:
name: "Restore_testing"
region: "{{ aws_ec2_autoscale_cluster.region }}"
id: "{{ _main_vpc_info.vpcs[0].vpc_id }}"
Expand All @@ -55,7 +55,7 @@

- name: Construct AWS instance type dict.
ansible.builtin.set_fact:
_restore_testing_sg: "{{ aws_vpc._result['Restore_testing'] }}"
_restore_testing_sg: "{{ aws_vpc_sg._result['Restore_testing'] }}"

- name: Remove restore testing query file.
ansible.builtin.file:
Expand Down
2 changes: 1 addition & 1 deletion roles/aws/aws_ec2_autoscale_cluster/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

- name: Set _aws_ec2_autoscale_cluster_security_group variable.
ansible.builtin.set_fact:
_aws_ec2_autoscale_cluster_security_group: "{{ aws_vpc._result[aws_ec2_autoscale_cluster.name] }}"
_aws_ec2_autoscale_cluster_security_group: "{{ aws_vpc_sg._result[aws_ec2_autoscale_cluster.name] }}"

- name: Reset subnets lists.
ansible.builtin.set_fact:
Expand Down
12 changes: 8 additions & 4 deletions roles/aws/aws_iam_role/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,28 @@
_combined_policies: "{{ aws_iam_role.managed_policies }}"
when: aws_iam_role.inline_policies.action is not defined or aws_iam_role.inline_policies.action | length == 0

- name: Create list of strings for predefined policies.
ansible.builtin.set_fact:
allowed_strings: ["ec2", "ecs", "backup"]

- name: Create assume role policy document if predefined string is passed.
ansible.builtin.set_fact:
_assume_role_policy: "{{ lookup('file', aws_iam_role.policy_document + '_document_policy.json') }}"
when: aws_iam_role.policy_document | type_debug == 'AnsibleUnicode'
when: aws_iam_role.policy_document in allowed_strings

- name: Create assume role policy document if template is provided.
ansible.builtin.set_fact:
_assume_role_policy: "{{ aws_iam_role.policy_document }}"
when: aws_iam_role.policy_document | type_debug != 'AnsibleUnicode'
when: aws_iam_role.policy_document not in allowed_strings

- name: Create an IAM role.
amazon.aws.iam_role:
profile: "{{ aws_iam_role.aws_profile }}"
name: "{{ aws_iam_role.name }}"
assume_role_policy_document: "{{ _assume_role_policy }}"
managed_policies: "{{ _combined_policies }}"
purge_policies: "{{ aws_iam_role.purge_policies }}"
tags: "{{ aws_iam_role.tags }}"
purge_policies: "{{ aws_iam_role.purge_policies | default(true) }}"
tags: "{{ aws_iam_role.tags | default({}) }}"
create_instance_profile: "{% if aws_iam_role.policy_document == 'ec2' %}true{% else %}false{% endif %}"
wait: true
register: _aws_iam_role_result
Expand Down
13 changes: 11 additions & 2 deletions roles/aws/aws_lambda/tasks/handle_url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
ansible.builtin.git:
repo: "{{ aws_lambda.function_file }}"
dest: /tmp/funct
update: true
accept_hostkey: true
become: true
become_user: "{{ ce_provision.username }}"

- name: Find all .j2 template files.
ansible.builtin.find:
paths: "{{ work_dir }}/{{ repo_name }}"
paths: "/tmp/funct"
patterns: "*.j2"
recurse: true
register: _j2_files
Expand All @@ -28,6 +32,11 @@

- name: Copy a zip archive of Lambda function.
community.general.archive:
path: "/tmp/funct"
path: "/tmp/funct/"
dest: "{{ _ce_provision_build_dir }}/{{ aws_lambda.name }}.zip"
format: zip

- name: Remove function directory
ansible.builtin.file:
path: /tmp/funct
state: absent
6 changes: 6 additions & 0 deletions roles/aws/aws_vpc/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
aws_vpc_sg:
aws_profile: "{{ _aws_profile }}"
region: "{{ _aws_region }}"
tags: {}
state: present
description: ""
aws_vpc:
aws_profile: "{{ _aws_profile }}"
region: "{{ _aws_region }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/aws/aws_vpc/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- name: Ensure default Security group is tagged.
ansible.builtin.include_tasks: "security_group.yml"
vars:
aws_vpc:
aws_vpc_sg:
name: "default"
id: "{{ _aws_vpc_vpc.vpc.id }}"
description: "default VPC security group"
Expand Down
24 changes: 12 additions & 12 deletions roles/aws/aws_vpc/tasks/security_group.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Configure vars if looping over list.
ansible.builtin.set_fact:
aws_vpc:
aws_vpc_sg:
name: "{{ _sec_group.name | default('') }}"
tags: "{{ _aws_vpc_vpc.vpc.tags | combine({'Name': _sec_group.name}) }}"
id: "{{ _aws_vpc_vpc.vpc.id }}"
Expand All @@ -11,18 +11,18 @@

- name: Create Security Group.
amazon.aws.ec2_security_group:
name: "{{ aws_vpc.name }}"
profile: "{{ aws_vpc.aws_profile }}"
region: "{{ aws_vpc.region }}"
tags: "{{ aws_vpc.tags }}"
state: "{{ aws_vpc.state }}"
vpc_id: "{{ aws_vpc.id }}"
description: "{{ aws_vpc.description | default('') }}"
rules: "{{ aws_vpc.rules | default(omit) }}"
rules_egress: "{{ aws_vpc.rules_egress | default(omit) }}"
purge_rules: "{{ aws_vpc.purge_rules | default(omit) }}"
name: "{{ aws_vpc_sg.name }}"
profile: "{{ aws_vpc_sg.aws_profile }}"
region: "{{ aws_vpc_sg.region }}"
tags: "{{ aws_vpc_sg.tags }}"
state: "{{ aws_vpc_sg.state }}"
vpc_id: "{{ aws_vpc_sg.id }}"
description: "{{ aws_vpc_sg.description }}"
rules: "{{ aws_vpc_sg.rules | default(omit) }}"
rules_egress: "{{ aws_vpc_sg.rules_egress | default(omit) }}"
purge_rules: "{{ aws_vpc_sg.purge_rules | default(omit) }}"
register: _aws_vpc_result

- name: Register aws_vpc SG results.
ansible.builtin.set_fact:
aws_vpc: "{{ aws_vpc | combine({'_result': {aws_vpc.name: _aws_vpc_result}}, recursive=True) }}"
aws_vpc_sg: "{{ aws_vpc_sg | combine({'_result': {aws_vpc_sg.name: _aws_vpc_result}}, recursive=True) }}"
2 changes: 1 addition & 1 deletion roles/aws/aws_vpc_subnet/tasks/subnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
name: aws/aws_vpc
tasks_from: security_group
vars:
aws_vpc:
aws_vpc_sg:
name: "{{ subnet.name }}"
profile: "{{ aws_vpc_subnet.aws_profile }}"
region: "{{ aws_vpc_subnet.region }}"
Expand Down