File tree Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 52
52
loop : " {{ __gcp_subnets_discovered.resources }}"
53
53
loop_control :
54
54
loop_var : __gcp_subnet_item
55
-
56
- - name : Discover GCP Cross Account Service Account Keys
57
- register : __gcp_xaccount_sa_discovered
58
- failed_when :
59
- - __gcp_xaccount_sa_discovered.rc == 1
60
- - " 'NOT_FOUND:' not in __gcp_xaccount_sa_discovered.stderr"
61
- - " 'Permission iam.serviceAccountKeys.list' not in __gcp_xaccount_sa_discovered.stderr"
62
- command : >
63
- gcloud iam service-accounts keys list
64
- --iam-account "{{ plat__gcp_xaccount_identity_name }}@{{ plat__gcp_project }}.iam.gserviceaccount.com"
65
- --format="json"
66
-
67
- - name : Set discovered Cross Account Service Account keys if exists
68
- when :
69
- - __gcp_xaccount_sa_discovered is defined
70
- - __gcp_xaccount_sa_discovered.stdout is defined
71
- - __gcp_xaccount_sa_discovered.stdout | length > 0
72
- ansible.builtin.set_fact :
73
- plat__gcp_xaccount_keys : " {{ __gcp_xaccount_sa_discovered.stdout | from_json }}"
Original file line number Diff line number Diff line change 12
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
# See the License for the specific language governing permissions and
15
- # limitations under the License.
15
+ # limitations under the License.
16
+
17
+ - name : Discover GCP Cross Account Service Account Keys
18
+ register : __gcp_xaccount_sa_discovered
19
+ failed_when :
20
+ - __gcp_xaccount_sa_discovered.rc == 1
21
+ - " 'NOT_FOUND:' not in __gcp_xaccount_sa_discovered.stderr"
22
+ - " 'Permission iam.serviceAccountKeys.list' not in __gcp_xaccount_sa_discovered.stderr"
23
+ command : >
24
+ gcloud iam service-accounts keys list
25
+ --iam-account "{{ plat__gcp_xaccount_identity_name }}@{{ plat__gcp_project }}.iam.gserviceaccount.com"
26
+ --format="json"
27
+
28
+ - name : Set discovered Cross Account Service Account keys if exists
29
+ when :
30
+ - __gcp_xaccount_sa_discovered is defined
31
+ - __gcp_xaccount_sa_discovered.stdout is defined
32
+ - __gcp_xaccount_sa_discovered.stdout | length > 0
33
+ ansible.builtin.set_fact :
34
+ plat__gcp_xaccount_keys : " {{ __gcp_xaccount_sa_discovered.stdout | from_json }}"
You can’t perform that action at this time.
0 commit comments