Class: QB::Ansible::Env::Devel
- Inherits:
-
QB::Ansible::Env
- Object
- QB::Ansible::Env
- QB::Ansible::Env::Devel
- Defined in:
- lib/qb/ansible/env/devel.rb
Overview
TODO:
document QB::Ansible::Env class.
Constant Summary collapse
Constants inherited from QB::Ansible::Env
Instance Attribute Summary
Attributes inherited from QB::Ansible::Env
#config, #filter_plugins, #library, #lookup_plugins, #python_path, #roles_path, #test_plugins
Instance Method Summary collapse
Methods inherited from QB::Ansible::Env
Constructor Details
This class inherits a constructor from QB::Ansible::Env
Instance Method Details
#to_h ⇒ return_type
TODO:
Document to_h method.
Returns @todo Document return value.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/qb/ansible/env/devel.rb', line 20 def to_h hash = super hash['ANSIBLE_HOME'] = ANSIBLE_HOME.to_s hash['PYTHONPATH'] = [ # (QB::ROOT / 'lib' / 'python'), (ANSIBLE_HOME / 'lib'), ENV['PYTHONPATH'], ]. compact. map( &:to_s ). join( ':' ) path = ENV['PATH'].split ':' path.insert \ path.find_index { |p| ! p.start_with?( './' ) }, (ANSIBLE_HOME / 'bin').to_s hash['PATH'] = path.join ':' # hash['ANSIBLE_CONNECTION'] = 'local' # hash['ANSIBLE_PYTHON_INTERPRETER'] = '/usr/local/bin/python2' hash end |