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

Write credentials to 1password with ansible

· 52CE 我爱测

I was hoping somebody knows if it's possible to put credentials in 1password by ansible? I found a module onepassword , but it is only for getting data from 1password. I need something that allows writing data to 1password. Do yo…

问题原文

原帖链接 · Nadia · CC BY-SA 4.0

I was hoping somebody knows if it's possible to put credentials in 1password by ansible?

I found a module onepassword, but it is only for getting data from 1password. I need something that allows writing data to 1password.

Do you know any options?

Thank you in advance.

已采纳解答

原帖链接 · Zeitounator · CC BY-SA 4.0

The link in your question points to a lookup plugin. There is also a raw lookup plugin as well as a module.

Note that the lookups, as all other lookups, will only run on the ansible controller, not on the target host. The module will run on the machine you are managing.

Meanwhile none of those are able to create an object in onepassword (for time being ?). But since the use of the lookups/module is conditionned to the availability of the op command line, why don't you pass a command to it directly with the ansible command module ?

I found the documentation for this. It is not straightforward but look rather easy (just a json file to create first).

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

资料来源与适用范围

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

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

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