chusiang.helloworld

Ansible 角色:你好,世界

构建状态

这是一个用于《通过 Ansible 自动化》一书的 Ansible 角色。

需求

无。

角色变量

请参见 defaults/main.yml

world: "world"

依赖

无。

示例剧本

给用户提供一个使用该角色的示例(例如,传递参数的变量)是很好的:

- hosts: servers
  roles:
     - { role: chusiang.helloworld }

执行结果:

$ ansible-playbook setup.yml

PLAY [执行 '你好,世界'] ******************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [回显 '你好,世界'] ******************************************************
changed: [localhost]

TASK [打印消息] ***********************************************************
ok: [localhost] => {
    "msg": [
        "你好,世界"
    ]
}

PLAY 总结 *********************************************************************
localhost                  : ok=3    changed=1    unreachable=0    failed=0

许可证

版权所有 (c) chusiang 2016-2017,依据 MIT 许可证。

关于项目

An Ansible role example for automate-with-ansible book.

安装
ansible-galaxy install chusiang.helloworld
许可证
Unknown
下载
1.4k
拥有者
A system engineer, like @DevOpsTW, @ansible-tw, @vim-tw, docker and @linux-taiwan. Hope one day can build a "🦄 Unicorn company" like《The Phoenix Project》.