Skip to content

Commit

Permalink
use exact regions from AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
adworjan committed Dec 13, 2023
1 parent fa56ead commit a30fcd5
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 114 deletions.
11 changes: 4 additions & 7 deletions .ansible-sign/sha256sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ b0b35c8cf39a7dfdb0692c8fc796dda38fdf448793d83e2503104b423a437007 aws_parking_st
8b8c3e48b0872ca247149870922aefd6c4b346b9fd5c24fff9a00d20df199f3c buildawsdetailedreport.yml
fbebf3d2acc8fa8b93de398c099bec0d384582365a9e885eca3ae10a46077c7f collections/requirements.yml
e2981c574fb52e82efcf807f74e8fb63744b8e88ce0b4019a95c1e3f2cc4f81a devfile.yaml
4cb7ea6a459bb3d191fbe3b9fbb52bc6dbfe31e1b76adabf7b5c9e0ccf0b4f94 roles/aws_opt_in_start/defaults/main.yml
207cb6dc0bb8b3c9388ba75aa3aa74570e68f0fce8d315eb84758eb74bd889c0 roles/aws_opt_in_start/tasks/main.yml
d38d5b606954eef22a54eecc796d7d49e65a4a09459f743abca1451871795d0c roles/aws_opt_in_start/tasks/start_ec2.yml
4cb7ea6a459bb3d191fbe3b9fbb52bc6dbfe31e1b76adabf7b5c9e0ccf0b4f94 roles/aws_opt_in_stop/defaults/main.yml
9ca94921ccf52e9a5e2a437c855fdf10e0fa9689f66b02aceacb4ff477648e0d roles/aws_opt_in_stop/tasks/main.yml
b8c2121806926f58faa4e46eb3a6481271f99804c07e8c54013303cffabe2ce8 roles/aws_opt_in_stop/tasks/stop_ec2.yml
4cb7ea6a459bb3d191fbe3b9fbb52bc6dbfe31e1b76adabf7b5c9e0ccf0b4f94 roles/aws_retrieve_info/defaults/main.yml
2b7ec8404296821bb7eb30ddb85de6e5607dc67e07b805fd0373e4147057f5e3 roles/aws_opt_in_start/tasks/main.yml
82c3a93e89b77e9644b828305b383ef9db8afd1341671a59b4b40a570e6aa2b4 roles/aws_opt_in_start/tasks/start_ec2.yml
f050ee6b755e2f590a67a73b495f510c8f114c2254c7e07952cea3e6b2edcfbb roles/aws_opt_in_stop/tasks/main.yml
e019a14d1236a2f7e5c1206d4ae0d6ce3efca830f10b455808ef66c2aabcc960 roles/aws_opt_in_stop/tasks/stop_ec2.yml
c4e600e0ed85b1abf7b410e67236976012c357493d83617b5d87524870b1e912 roles/aws_retrieve_info/tasks/main.yml
86bdf585a205e2367a0c090efe7f1ed59bf6040307aa38b990e39207315629e2 roles/aws_retrieve_info/tasks/retrieve_info.yml
6c8b0dca0627067f90cf42f2eb4909022d5460bb7326949d98ce33c0232844b3 roles/aws_schedule_parking/tasks/main.yml
Expand Down
22 changes: 11 additions & 11 deletions .ansible-sign/sha256sum.txt.sig
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAmV5wKwACgkQTiIiIXrU
DNGExQwAn/SunHMbKxOfvQVmnWfgnOeTsFNh0HxOAIhE2NSEGF3b/Ln4ddg3OPf0
dTh1Bfl5/eFTaG+J08Ww9aQoZ/t7v1Gsg6af6eaXcSa41nSSWmKKERXfMMLUXLL0
w0aS7MG74QQdUBt6z713i2CZxecUf7tuRlhKPvT0Q533NpPpULePRl4BmRaSCJQN
MVcMQkwv37zAUVwGlwh/TEb563QMr4prA2GdFYOaL9DTdCadGaWDCoTSM9Oht7iX
G2Zqu9rW8ZrGWG7ZoBpZi5QO+NPQ/pv/r5RVdo5waBQR+q+lnYOuwc6QOFX7rmgl
5yFMCgLmcqdaN5jp0/To+Lw899TDngTwtbTlkskbpDkmrD4fI2U7zY/Q2FEd23By
Y6d4PjCCBRvCAEZJb5IoIqxC23ciV0Il0TcNrONaBn9UAJPgwCsMWPNipfpd9kdE
UvKA7ZFJIvsXLQwDtXINUO+3kqrW3+afits+AQYyayRwKqUnj6A/xGkQZ9wpBZRD
i09EXwrC
=+E09
iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIiIXrUDNEFAmV5wjMACgkQTiIiIXrU
DNFgvwv+J3ilpaaKV/JlUKn/0iMkaOwG0ePkRmDGbxWgYAx/uZ6g2ESRW4E3HCm0
BwHcyc1vQWEc4IzeeWPpuXoWg/di7mJEqqtFsazu16UhgGGSf2wuLyZ+/uxTMdeO
7M3n1NfLTXaOLEn02obsiXrWM4RuP0ObGMEBUpSECxpk9V3cKGe67Oz8jg6fqkIt
j0H7WiVnWOmoRhTiOdsnpFC5gsqPuUw04Ebqu1B5ySKWcmZQB6tgGVyrZIbiRdo7
OZliV2btRdjMgr9y/+3mHpAIpgJ2DMWPt+y4K0wptQNch8XVN8IbBYBo7BsiM+oc
LOT74GqeoUedFenF+t8xREPUcUpNbcuGNjJahwt9y3Coysde70ntiGtd5jlPcKGW
h9R3JxJzCIE9Xf0RVXpxJ+C8f1/3vZyahpzyeIS+eP1SO+Y/H9vFjhHBFlU+S+Dc
I21cQIEidFq1DySP4C4BvQeinBkz6TIv+WqJ4wEBhiDoMryAWLPOhcPrpA+Ab6dl
dP0PKc+s
=zlUg
-----END PGP SIGNATURE-----
30 changes: 0 additions & 30 deletions roles/aws_opt_in_start/defaults/main.yml

This file was deleted.

9 changes: 8 additions & 1 deletion roles/aws_opt_in_start/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
- name: Get all regions
amazon.aws.aws_region_info:
region: "us-east-2"
register: allregions

- name: Loop over all ec2 regions
ansible.builtin.include_tasks:
file: start_ec2.yml
loop: "{{ ec2_regions }}"
loop: "{{ allregions.regions }}"
loop_control:
label: "{{ item.region_name }}"
4 changes: 2 additions & 2 deletions roles/aws_opt_in_start/tasks/start_ec2.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Start EC2 Instances based on tag in region {{ item }}
- name: Start EC2 Instances based on tag in region {{ item.region_name }}
amazon.aws.ec2_instance:
region: "{{ item }}"
region: "{{ item.region_name }}"
filters:
"tag:owner": "{{ owner }}"
"tag:env": "{{ env }}"
Expand Down
30 changes: 0 additions & 30 deletions roles/aws_opt_in_stop/defaults/main.yml

This file was deleted.

9 changes: 8 additions & 1 deletion roles/aws_opt_in_stop/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
- name: Get all regions
amazon.aws.aws_region_info:
region: "us-east-2"
register: allregions

- name: Loop over all ec2 regions
ansible.builtin.include_tasks:
file: stop_ec2.yml
loop: "{{ ec2_regions }}"
loop: "{{ allregions.regions }}"
loop_control:
label: "{{ item.region_name }}"
4 changes: 2 additions & 2 deletions roles/aws_opt_in_stop/tasks/stop_ec2.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Stop EC2 Instances based on tag in region {{ item }}
- name: Stop EC2 Instances based on tag in region {{ item.region_name }}
amazon.aws.ec2_instance:
region: "{{ item }}"
region: "{{ item.region_name }}"
filters:
"tag:owner": "{{ owner }}"
"tag:env": "{{ env }}"
Expand Down
30 changes: 0 additions & 30 deletions roles/aws_retrieve_info/defaults/main.yml

This file was deleted.

0 comments on commit a30fcd5

Please sign in to comment.