Skip to content

Resolving conflicts pr 2.x #1834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions docs/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [AWS AMI ASG Cleanup](/roles/aws/aws_ami_asg_cleanup)
- [AWS AMI](/roles/aws/aws_ami)
- [AWS Backup](/roles/aws/aws_backup)
- [AWS Backup Validation](/roles/aws/aws_backup_validation)
- [AWS CloudFront distribution](/roles/aws/aws_cloudfront_distribution)
- [Cloudwatch log group](/roles/aws/aws_cloudwatch_log_group)
- [Amazon credentials](/roles/aws/aws_credentials)
Expand All @@ -23,6 +24,7 @@
- [AWS OpenSearch](/roles/aws/aws_opensearch)
- [AWS key pair.](/roles/aws/aws_provision_ec2_keypair)
- [AWS RDS](/roles/aws/aws_rds)
- [AWS Resource Group.](/roles/aws/aws_resource_group)
- [AWS S3 Bucket](/roles/aws/aws_s3_bucket)
- [AWS Security Groups](/roles/aws/aws_security_groups)
- [AWS SNS](/roles/aws/aws_sns)
Expand Down
25 changes: 25 additions & 0 deletions docs/roles/aws/aws_backup_validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# AWS Backup Validation

Creates AWS Restore testing plan for EC2 and RDS, EventBridge rule that gets triggered by restore testing and Lambda backup validation that will check and notify about the restored instance.

<!--TOC-->
<!--ENDTOC-->

<!--ROLEVARS-->
## Default variables
```yaml
---
aws_backup_validation:
name: "RestoreValidation"
description: "Restore validation for"
timeout: 60
runtime: "python3.12"
handler: "lambda_handler"
resources:
- EC2
- RDS
#- EFS

```

<!--ENDROLEVARS-->
7 changes: 7 additions & 0 deletions docs/roles/aws/aws_resource_group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AWS Resource Group.
Creates a Resource Group based on Environment and resource that is getting built. Once the resource group is created, AWS will automatically add or remove resources from groups.
<!--TOC-->
<!--ENDTOC-->

<!--ROLEVARS-->
<!--ENDROLEVARS-->
15 changes: 14 additions & 1 deletion docs/roles/debian/wazuh.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,20 @@ wazuh:
wazuh_manager_email_log_source: alerts.log
wazuh_manager_log_level: 3
wazuh_manager_email_level: 12
wazuh_manager_whitelist: 1.1.1.1
wazuh_manager_config:
active_responses:
- command: "firewall-drop"
location: "all"
rules_id: "31151,5712,104130,101071,101132,101238,101251,103011"
repeated_offenders: "30,60,120"
timeout: 600
- command: "firewall-drop"
location: "all"
rules_id: "100205"
repeated_offenders: "30,60,120"
timeout: 3600
wazuh_manager_globals:
- '1.1.1.1'
agent_groups: [] # maps to `groups` string in agent config above
wazuh_manager_extra_emails: [] # list of additional emails to send, e.g.
#- enable: true
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 @@ -66,6 +66,6 @@
loop_var: plan
when: aws_backup.plans | length

- name: Include backup validation role.
- name: Include aws backup validation role.
ansible.builtin.include_role:
name: aws/aws_backup_validation
25 changes: 25 additions & 0 deletions roles/aws/aws_backup_validation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# AWS Backup Validation

Creates AWS Restore testing plan for EC2 and RDS, EventBridge rule that gets triggered by restore testing and Lambda backup validation that will check and notify about the restored instance.

<!--TOC-->
<!--ENDTOC-->

<!--ROLEVARS-->
## Default variables
```yaml
---
aws_backup_validation:
name: "RestoreValidation"
description: "Restore validation for"
timeout: 60
runtime: "python3.12"
handler: "lambda_handler"
resources:
- EC2
- RDS
#- EFS

```

<!--ENDROLEVARS-->
6 changes: 3 additions & 3 deletions roles/aws/aws_backup_validation/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
aws_backup_validation:
name: 'RestoreValidation'
description: 'Restore validation for'
name: "RestoreValidation"
description: "Restore validation for"
timeout: 60
runtime: python3.12
runtime: "python3.12"
handler: "lambda_handler"
resources:
- EC2
Expand Down
4 changes: 2 additions & 2 deletions roles/aws/aws_backup_validation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Create a role and attach policies
amazon.aws.iam_role:
name: LambdaBackupRestoreRole
assume_role_policy_document: "{{ lookup('file','trusted_entitites.j2') }}"
assume_role_policy_document: "{{ lookup('file', 'trusted_entitites.j2') }}"
managed_policies:
- arn:aws:iam::aws:policy/AmazonEC2FullAccess
- arn:aws:iam::aws:policy/service-role/AmazonEFSCSIDriverPolicy
Expand All @@ -25,7 +25,7 @@
- name: Update AWSBackupDefaultServiceRole
amazon.aws.iam_role:
name: AWSBackupDefaultServiceRole
assume_role_policy_document: "{{ lookup('file','pass_role_backup.j2') }}"
assume_role_policy_document: "{{ lookup('file', 'pass_role_backup.j2') }}"
managed_policies:
- arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup
- arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForRestores
Expand Down
7 changes: 7 additions & 0 deletions roles/aws/aws_resource_group/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AWS Resource Group.
Creates a Resource Group based on Environment and resource that is getting built. Once the resource group is created, AWS will automatically add or remove resources from groups.
<!--TOC-->
<!--ENDTOC-->

<!--ROLEVARS-->
<!--ENDROLEVARS-->
15 changes: 14 additions & 1 deletion roles/debian/wazuh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,20 @@ wazuh:
wazuh_manager_email_log_source: alerts.log
wazuh_manager_log_level: 3
wazuh_manager_email_level: 12
wazuh_manager_whitelist: 1.1.1.1
wazuh_manager_config:
active_responses:
- command: "firewall-drop"
location: "all"
rules_id: "31151,5712,104130,101071,101132,101238,101251,103011"
repeated_offenders: "30,60,120"
timeout: 600
- command: "firewall-drop"
location: "all"
rules_id: "100205"
repeated_offenders: "30,60,120"
timeout: 3600
wazuh_manager_globals:
- '1.1.1.1'
agent_groups: [] # maps to `groups` string in agent config above
wazuh_manager_extra_emails: [] # list of additional emails to send, e.g.
#- enable: true
Expand Down
Loading