Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit be4e4ba

Browse files
author
Matej Stajduhar
committed
Adding-debug-3
1 parent 705c413 commit be4e4ba

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

roles/aws/aws_backup_validation/templates/trusted_entitites.json.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Action": "sts:AssumeRole",
1010
"Condition": {
1111
"StringEquals": {
12-
"aws:SourceArn": "arn:aws:events:{{ _aws_region }}:{{ _acc_id }}:rule/{{ aws_iam_role.name }}",
12+
"aws:SourceArn": "arn:aws:lambda:{{ _aws_region }}:{{ _acc_id }}:function:{{ aws_iam_role.name }}",
1313
"aws:SourceAccount": "{{ _acc_id }}"
1414
}
1515
}

roles/aws/aws_iam_role/tasks/main.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
ansible.builtin.set_fact:
2626
allowed_strings: ["ec2", "ecs", "backup", "event"]
2727

28-
- name: Debug vars-
29-
ansible.builtin.debug:
30-
msg: aws_iam_role.policy_document
31-
3228
- name: Create assume role policy document if predefined string is passed.
3329
ansible.builtin.set_fact:
3430
_assume_role_policy: "{{ lookup('file', aws_iam_role.policy_document + '_document_policy.json') }}"
@@ -39,17 +35,6 @@
3935
_assume_role_policy: "{{ aws_iam_role.policy_document }}"
4036
when: aws_iam_role.policy_document not in allowed_strings
4137

42-
- name: Create policy document if j2 file is provided.
43-
ansible.builtin.template:
44-
src: "{{ aws_iam_role.policy_document }}"
45-
dest: /tmp/policy_document.json
46-
when: (aws_iam_role.policy_document | basename) is match('.*\.j2$')
47-
48-
- name: Set var for Assume policy document.
49-
ansible.builtin.set_fact:
50-
_assume_role_policy: "/tmp/policy_document.json"
51-
when: (aws_iam_role.policy_document | basename) is match('.*\.j2$')
52-
5338
- name: Create an IAM role {{ aws_iam_role.name }}.
5439
amazon.aws.iam_role:
5540
profile: "{{ aws_iam_role.aws_profile }}"

0 commit comments

Comments
 (0)