I understand that some members of the community have offered you some solutions in order to resolve your issue, but apparently none of them has been useful for your issue. Also, I understand that you're using GCP to create the service account and assign the roles.
Maybe you can try to create the service account and the roles for the service account from ansible, and check if that works.
You can create the service account using this plugin google.cloud.gcp_iam_service_account – Creates a GCP ServiceAccount
Example:
- name: create a service account
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
And you can assign the roles using the plugin google.cloud.gcp_iam_role – Creates a GCP Role
Example:
- name: create a role
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
included_permissions:
- iam.roles.list
- iam.roles.create
- iam.roles.delete
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
Remember that these plugins are part of the google.cloud collection, which should be installed if you're using ansible package.