大网数据广告活动
服务器运维问答

GCP+Ansible: how to run a playbook with user account

· 52CE 我爱测

Is it anyhow possible to run an ansible task from google.cloud plugin using a user account (not a service account)? We have already set up a comprehensive hierarchy of user groups and roles and translating that into service accou…

问题原文

原帖链接 · S. Pauk · CC BY-SA 4.0

Is it anyhow possible to run an ansible task from google.cloud plugin using a user account (not a service account)? We have already set up a comprehensive hierarchy of user groups and roles and translating that into service account will be a pain.

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 4.0

No. Ansible google.cloud credentials must be service accounts.

Refer to the Ansible GCE Guide. auth_kind only changes how this service account is looked up:

  • serviceaccount Use the account from service_account_file or service_account_contents. This one is possibly the easiest to use.
  • machineaccount Use the service account associated with the GCP instance running Ansible.
  • application Use application default credentials associated with the APIs provided by the scopes parameter.

Automation accounts should not be end user accounts. Removes the temptation to do something interactively as the automation user. API key style creds are strong, unlike garbage human passwords.

Creating an service account is easy. The hard part was validating the roles...

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-11-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。