bash_command:Ansible角色,通过角色执行任意bash命令

时间:2021-05-24 13:12:08
【文件属性】:
文件名称:bash_command:Ansible角色,通过角色执行任意bash命令
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-24 13:12:08
bash_command 将在传递的dir执行传递的command 。 对于执行捆绑安装和通过角色耙db:migrate之类的操作很有用。 - hosts : defaults roles : - { role: bash_command, dir: '/var/www/my_app', command: 'bundle install' } - { role: bash_command, dir: '/var/www/my_app', command: 'bundle exec rake db:migrate' } 另外,您可以指定角色仅在单个节点上运行。 对于在多个主机上运行会导致错误的情况很有用。 - hosts : defaults roles : - { role: bash_command, dir: '/var/www/my_app',
【文件预览】:
bash_command-master
----tasks()
--------main.yml(178B)
----README.md(746B)
----LICENSE(1KB)
----meta()
--------main.yml(310B)
----defaults()
--------main.yml(28B)

网友评论