inshbouddah
This commit is contained in:
parent
11bee43b1d
commit
2ac0ee3e05
@ -39,6 +39,22 @@ module "compute" {
|
|||||||
|
|
||||||
module "iam" {
|
module "iam" {
|
||||||
source = "../../modules/iam"
|
source = "../../modules/iam"
|
||||||
|
|
||||||
project_id = var.project_id
|
project_id = var.project_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "google_client_openid_userinfo" "me" {
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "local_file" "ansible_config" {
|
||||||
|
content = templatefile("${path.module}/../../templates/ansible.cfg.tpl",
|
||||||
|
{
|
||||||
|
remote_user = data.google_client_openid_userinfo.me.email
|
||||||
|
}
|
||||||
|
)
|
||||||
|
filename = "../../ansible/ansible.cfg"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "local_file" "service_account" {
|
||||||
|
content = base64decode(module.iam.service_account_key)
|
||||||
|
filename = "../../ansible/service_account.json"
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
[defaults]
|
||||||
|
host_key_checking = False
|
||||||
|
inventory = gcp_compute.yml
|
||||||
|
interpreter_python = auto_silent
|
||||||
|
remote_user = ${replace(replace(remote_user, ".", "_"), "@", "_")}
|
||||||
|
|
||||||
|
[inventory]
|
||||||
|
enable_plugins = gcp_compute, auto, host_list, yaml, ini, toml, script
|
Loading…
Reference in New Issue
Block a user