【发布时间】:2017-03-26 10:20:46
【问题描述】:
正如标题所暗示的那样,可以说...安装存储在 Postgres 数据库表中的软件包列表。 示例:
testing=# select * from package;
name
-------
rsync
lftp
curl
(3 rows)
然后在某个状态下使用这些值来安装适当的包.. 类似:
install_network_packages:
pkg.installed:
pkgs:
- 'select * from package'
我目前有这种状态,它返回表的值,但不知道从那里去哪里:
testing:
module.run:
- name: postgres.psql_query
- query: 'select * from public.package'
- maintenance_db: testing
输出:
奴才1:
ID: testing
Function: module.run
Name: postgres.psql_query
Result: True
Comment: Module function postgres.psql_query executed
Started: 15:25:23.161788
Duration: 79.784 ms
Changes:
----------
ret:
|_
----------
name:
rsync
|_
----------
name:
lftp
|_
----------
name:
curl
minion1 总结
成功:1(更改=1)
失败:0
运行的状态总数:1 总运行时间:79.784 毫秒
【问题讨论】:
标签: postgresql salt-stack