Just a little "Hello World" role for testing purposes. Primarily used to test
that AWX and other tools are able to successfully ansible-galaxy install
this
role and apply it.
Run with verbose output (i.e., -v
) to debug the host's standard output.
Branch | Status |
---|---|
develop | |
master |
See VERSION for notes/history.
N/A
All over-writable variables used in this role are defined in defaults/main.yml.
You can override the variables in any standard Ansible-way (e.g. group_vars, host_vars, playbook variables, command-line, etc.).
The variables in this role include:
Name | Required | Default | Choices | Comments |
---|---|---|---|---|
hello_world_msg | yes | 'Hello, World!' | The message to echo on a host | |
hello_world_verbosity | yes | 1 | 1,2,3,4,5 | The verbosity level of debug messages |
hello_world_changed | no | false | true,false | Whether the shell commands are "changed" and fire handler(s). |
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Role | Description | Version |
---|---|---|
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- name: Role with defaults
hosts: servers
gather_facts: true
tasks:
- name: apply ar_hello_world role
import_role:
name: ar_hello_world
- name: Role with over-rides
hosts: servers
gather_facts: true
tasks:
- name: apply ar_hello_world role
import_role:
name: ar_hello_world
vars:
hello_world_msg: 'Goodbye, World!'
Note: Form (1) is preferred in playbooks as it keeps the playbooks reusable. Ideally, you should be over-riding variable values via group/host vars in an inventory.
Note: You must gather facts (
gather_facts: true
) foransible_system
to detect Windows vs. Linux hosts.
TBD
Author | |
---|---|
Ben Watson | Benjamin.Watson@kiewit.com |
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Please refer to the .gitignore file and update accordingly depending on your development environment, etc. The particular file was generated at gitignore.io and contains settings for the following:
- Ansible
- Python
- Vim
- Eclipse
- IntelliJ IDEA
- Linux
- Windows
Please update VERSION.md as you release new versions of your role and try to abide by Semantic Versioning.
Please try to keep this role as self-contained as possible such that it may be
simply installed (e.g. ansible-galaxy install
) and applied as part of a
playbook.
This role leverages ansible-mdgen
to generate "pretty" documentation for this role. As such, this role contains a
mkdocs
configuration at the root of the project folder and a docs/
sub-folder.
Please consult the ansible-mdgen
documentation for advanced usage, but as a
primer for getting started, do the following:
cd <path_to_root_of_role>
pip install -r docs/requirements.txt
ansible-mdgen .
# view your documentation live as you author role
mkdocs serve
# build your docs for distribution/hosting
# note, the resulting site/ folder is ignored via Python .gitignore rules
mkdocs build