Giter Club home page Giter Club logo

mcoresource's Introduction

Nobody has written my manual yet. Try arbitrary shell input and see what happens.

mcoresource's People

Contributors

fiddyspence avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

lvg

mcoresource's Issues

filter identity does not work

When I use an identity filter mcoresource does not use it:

$repo_server = 'repo.domain.local'
...
mco { 'action':
  ...
  agent  => 'puppetd',
  action => 'runonce',
  filter => { 'identity' => [ $repo_server ] },
  ...
}

results in a debug log with an empty identiry filter:

debug: {:disctimeout=>2, :agent=>"puppetd", :collective=>"mcollective", :timeout=>2, :filter=>{"identity"=>[], "compound"=>[], "fact"=>[], "agent"=>[], "cf_class"=>[]}, :discovery_method=>nil, :discovery_options=>[], :config=>"/etc/mcollective/client.cfg", :verbose=>false, :mcollective_limit_targets=>false}

By the way, the action isn't shown in the debug, is this a possible net issue to log?

refreshonly => true does not work

I'd like to use mcoresource for creating subversion repositories on a remote subversion server via storedconfigs. mco is used to fire the remote puppet-run to create the repo. Before and afterwards I use an exec for precheck and wait loop for remote puppetrun to complete. When de precheck results in executing a refresh event will be propagated:

debug: Exec[PreCheck_lvg9](provider=posix): Executing check '/usr/bin/svn list --username=svn_lvg9 --password=LVG9 --no-auth-cache --non-interactive  --trust-server-cert https://svn.domain.local/lvg9 2>/dev/null'
debug: Executing '/usr/bin/svn list --username=svn_lvg9 --password=LVG9 --no-auth-cache --non-interactive  --trust-server-cert https://svn.domain.local/lvg9 2>/dev/null'
debug: Exec[PreCheck_lvg9](provider=posix): Executing '/bin/true'
debug: Executing '/bin/true'
notice: /Stage[main]/Svn::Client/Svn::Reporemote[lvg9]/Exec[PreCheck_lvg9]/returns: executed successfully
debug: /Stage[main]/Svn::Client/Svn::Reporemote[lvg9]/Exec[PreCheck_lvg9]: The container Svn::Reporemote[lvg9] will propagate my refresh event

but mco is NOT executed!

I'm using the following code-snippet

$check = "/usr/bin/svn list --username=svn_${repo_name} --password=${repo_pw} --no-auth-cache --non-interactive  --trust-server-cert https://${repo_server}/${repo_name} 2>/dev/null"

exec { "PreCheck_${repo_name}":
  command   => '/bin/true',
  unless    => $check,
  logoutput => false,
  require   => Package["subversion-${svn::params::version}*"],
} ->
mco { "Create_${repo_name}":
  agent       => 'puppetd',
  action      => 'runonce',
  filter      => {
    'identity' => [
      $repo_server,
    ],
  },
  configfile  => '/etc/mcollective/client.cfg',
} ->
exec { "Check_${repo_name}":
  command     => $check,
  tries       => 20,
  try_sleep   => 10,
  logoutput   => false,
  refreshonly => true,
}

Adding refreshonly => true does not help, adding refreshonly => false results in an always executing mco and that is not wanted.

make collective configurable

Collecive now defaults to mcollective, with the use of subcollectives I'd like to use a subcollective. See corresponding debug:

debug: {:disctimeout=>2, :agent=>"puppetd", :collective=>"mcollective", :timeout=>2, :filter=>{"identity"=>[], "compound"=>[], "fact"=>[], "agent"=>[], "cf_class"=>[]}, :discovery_method=>nil, :discovery_options=>[], :config=>"/etc/mcollective/client.cfg", :verbose=>false, :mcollective_limit_targets=>false}

Example call with subcollective definition:

mco { 'action':
   agent      => $agent,
   action     => $action,
   filter     => $filter,
   configfile => $configfile,
   collective => $subcollective,
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.