Class: Kitchen::Provisioner::YansiblePusher
- Inherits:
-
Base
- Object
- Base
- Kitchen::Provisioner::YansiblePusher
- Defined in:
- lib/kitchen/provisioner/yansible_pusher.rb
Overview
YansiblePusher is a Kitchen provisioner plugin for Ansible. It allows you to use Ansible playbooks to provision test instances in Test Kitchen.
Instance Attribute Summary collapse
-
#sandbox_path ⇒ Object
readonly
Returns the value of attribute sandbox_path.
Instance Method Summary collapse
Instance Attribute Details
#sandbox_path ⇒ Object (readonly)
Returns the value of attribute sandbox_path.
42 43 44 |
# File 'lib/kitchen/provisioner/yansible_pusher.rb', line 42 def sandbox_path @sandbox_path end |
Instance Method Details
#init_command ⇒ Object
49 50 51 52 |
# File 'lib/kitchen/provisioner/yansible_pusher.rb', line 49 def init_command # No initialization command needed on the remote instance nil end |
#install_command ⇒ Object
44 45 46 47 |
# File 'lib/kitchen/provisioner/yansible_pusher.rb', line 44 def install_command # No initialization command needed on the remote instance nil end |
#prepare_command ⇒ Object
54 55 56 57 |
# File 'lib/kitchen/provisioner/yansible_pusher.rb', line 54 def prepare_command # No preparation command needed on the remote instance nil end |
#run_command ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/kitchen/provisioner/yansible_pusher.rb', line 59 def run_command info("Running Ansible Playbook: #{config[:playbook]}") begin create_sandbox run_ansible info('Ansible Playbook Complete!') ensure cleanup_sandbox end ensure_windows_exit_code if windows_instance? end |