Sha256: f03b44df219c47506dec0c89a4fbd6e1176d925b429cc7ab87b52d1ee272aa67

Contents?: true

Size: 1.12 KB

Versions: 22

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::Ansible::Module
  # 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

22 entries across 22 versions & 1 rubygems

Version Path
qb-0.3.25 roles/qb/role/templates/library/module.rb.j2
qb-0.3.24 roles/qb/role/templates/library/module.rb.j2
qb-0.3.23 roles/qb/role/templates/library/module.rb.j2
qb-0.3.22 roles/qb/role/templates/library/module.rb.j2
qb-0.3.21 roles/qb/role/templates/library/module.rb.j2
qb-0.3.20 roles/qb/role/templates/library/module.rb.j2
qb-0.3.19 roles/qb/role/templates/library/module.rb.j2
qb-0.3.18 roles/qb/role/templates/library/module.rb.j2
qb-0.3.17 roles/qb/role/templates/library/module.rb.j2
qb-0.3.16 roles/qb/role/templates/library/module.rb.j2
qb-0.3.15 roles/qb/role/templates/library/module.rb.j2
qb-0.3.14 roles/qb/role/templates/library/module.rb.j2
qb-0.3.13 roles/qb/role/templates/library/module.rb.j2
qb-0.3.12 roles/qb.role/templates/library/module.rb.j2
qb-0.3.11 roles/qb.role/templates/library/module.rb.j2
qb-0.3.10 roles/qb.role/templates/library/module.rb.j2
qb-0.3.9 roles/qb.role/templates/library/module.rb.j2
qb-0.3.8 roles/qb.role/templates/library/module.rb.j2
qb-0.3.7 roles/qb.role/templates/library/module.rb.j2
qb-0.3.6 roles/qb.role/templates/library/module.rb.j2