Sha256: 1044decc77daac15cd3b37e361aba3adaff4828b81f9f9e7b9e810ef12f2085f

Contents?: true

Size: 1.12 KB

Versions: 36

Compression:

Stored size: 1.12 KB

Contents

#!/usr/bin/env ruby
# WANT_JSON

# init bundler in dev env
if ENV['QB_DEV_ENV']
  ENV.each {|k, v|
    if k.start_with? 'QB_DEV_ENV_'
      ENV[k.sub('QB_DEV_ENV_', '')] = v
    end
  }
  require 'bundler/setup'
end

require 'qb'
require 'nrser'

class {{ role_module_class }} < QB::AnsibleModule
  # define arg names to NRSER::Types::Type instances here and they
  # will be type checked and set as @<name>
  # 
  # example:
  # 
  #     arg :x, NRSER::Types.array(String)
  # 
  # will check that the input json has a key named 'x' and that it's value
  # is an Array of String instances, then set it's value as `@x`.
  # 
  
  # entry point for the module. invoked by {\#run}.
  # 
  # @return [nil | {Symbol => #to_json}]
  #   when returning:
  #   
  #   -   `nil`: module will successfully exit with no additional changes.
  #       
  #   -   `{Symbol => #to_json}`: Hash will be merged over @facts that 
  #       are returned by the module to be set in the Ansible runtime and
  #       the module will exit successfully.
  #       
  def main
    return nil
  end # #main
end # {{ role_module_class }}

{{ role_module_class }}.new.run

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
qb-0.3.3 roles/qb.role/templates/library/module.rb.j2
qb-0.3.2 roles/qb.role/templates/library/module.rb.j2
qb-0.3.1 roles/qb.role/templates/library/module.rb.j2
qb-0.1.88 roles/qb.role/templates/library/module.rb.j2
qb-0.1.87 roles/qb.role/templates/library/module.rb.j2
qb-0.1.86 roles/qb.role/templates/library/module.rb.j2
qb-0.1.85 roles/qb.role/templates/library/module.rb.j2
qb-0.1.84 roles/qb.role/templates/library/module.rb.j2
qb-0.1.83 roles/qb.role/templates/library/module.rb.j2
qb-0.1.82 roles/qb.role/templates/library/module.rb.j2
qb-0.1.81 roles/qb.role/templates/library/module.rb.j2
qb-0.1.80 roles/qb.role/templates/library/module.rb.j2
qb-0.1.79 roles/qb.role/templates/library/module.rb.j2
qb-0.1.78 roles/qb.role/templates/library/module.rb.j2
qb-0.1.77 roles/qb.role/templates/library/module.rb.j2
qb-0.1.76 roles/qb.role/templates/library/module.rb.j2
qb-0.1.75 roles/qb.role/templates/library/module.rb.j2
qb-0.1.74 roles/qb.role/templates/library/module.rb.j2
qb-0.1.73 roles/qb.role/templates/library/module.rb.j2
qb-0.1.72 roles/qb.role/templates/library/module.rb.j2