Module: Ansible
- Extended by:
- Ansible
- Includes:
- Config, Methods, PlaybookMethods
- Included in:
- Ansible
- Defined in:
- lib/ansible-wrapper.rb,
lib/ansible/ad_hoc.rb,
lib/ansible/config.rb,
lib/ansible/output.rb,
lib/ansible/version.rb,
lib/ansible/playbook.rb,
lib/ansible/shortcuts.rb
Overview
A lightweight Ruby wrapper around Ansible that allows for ad-hoc commands and playbook execution. The primary purpose is to support easy streaming output.
Defined Under Namespace
Modules: AdHoc, Config, Methods, Output, Playbook, PlaybookMethods, SafePty
Constant Summary collapse
- VERSION =
'0.3.0'
Constants included from PlaybookMethods
Constants included from Methods
Constants included from Config
Config::PATH, Config::SKIP_HOSTVARS
Instance Method Summary collapse
-
#<<(cmd) ⇒ Object
shortcut to run a Playbook, streaming the output.
-
#[](cmd) ⇒ Object
shortcut for executing an Ad-Hoc command.
-
#enable_shortcuts! ⇒ Object
Enables shortcuts.
Methods included from PlaybookMethods
Methods included from Methods
#list_hosts, #one_off, #parse_host_vars
Methods included from Config
Instance Method Details
#<<(cmd) ⇒ Object
shortcut to run a Playbook, streaming the output
14 15 16 |
# File 'lib/ansible/shortcuts.rb', line 14 def <<(cmd) Playbook.stream cmd end |
#[](cmd) ⇒ Object
shortcut for executing an Ad-Hoc command
7 8 9 |
# File 'lib/ansible/shortcuts.rb', line 7 def [](cmd) AdHoc.run cmd end |
#enable_shortcuts! ⇒ Object
Enables shortcuts
17 18 19 |
# File 'lib/ansible-wrapper.rb', line 17 def enable_shortcuts! require 'ansible/shortcuts' end |