An Ansible role for automate-with-ansible book.
None.
See the defaults/main.yml
.
world: "world"
None.
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: chusiang.helloworld }
Execute result:
$ ansible-playbook setup.yml
PLAY [Play 'Hello World'] ******************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [echo 'hello world'] ******************************************************
changed: [localhost]
TASK [print message] ***********************************************************
ok: [localhost] => {
"msg": [
"Hello world"
]
}
PLAY RECAP *********************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0
Copyright (c) chusiang from 2016-2017 under the MIT license.