Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add define jboss::cliexec that can execute any JBoss custom methods for any CLI path #42

Open
cardil opened this issue Jan 22, 2016 · 3 comments
Labels

Comments

@cardil
Copy link
Collaborator

cardil commented Jan 22, 2016

This feature request describes new define: jboss::cliexec.

Description for Wiki (draft):

WIKI CUT HERE

The jboss::cliexec defined type

This define is very versatile. It can be used to execute any JBoss CLI method for any CLI path. This define also supports parameters onlyif and unless. One of them must be present to prevent idempotent issues, they should work similar to ones defined in Puppet build-in resource exec.

jboss::cliexec { '/subsystem=jgroups/stack=udp:add-protocol(type=PING)':
  unless => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}

Parameters of jboss::cliexec:

This type uses JBoss module standard metaparameters

unless parameter

The unless parameter can be used to check if resource should be executed. If passed command fails that means that it should be run. You must pass unless if not passing onlyif and only one of them can be set for given resource. Example:

jboss::cliexec { '/subsystem=jgroups/stack=udp:add-protocol(type=PING)':
  unless => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}

onlyif parameter

The onlyif parameter can be used to check if resource should be executed. If passed command succeds that means that it should be run. You must pass onlyif if not passing unless and only one of them can be set for given resource Example:

jboss::cliexec { '/subsystem=jgroups/stack=udp:remove-protocol(type=PING)':
  onlyif => '/subsystem=jgroups/stack=udp/protocol=PING:read-resource',
}

command parameter

This is the namevar. Command to be executed as full CLI entry and method. The command must be passed without /profile=<profile-name> in domain mode as well (for that profile parameter must be used).

basepath parameter

The base path can be used to shorten recurring paths in commands. Example:

jboss::cliexec { ':remove-protocol(type=PING)':
  onlyif   => '/protocol=PING:read-resource',
  basepath => '/subsystem=jgroups/stack=udp',
}

WIKI CUT HERE

Scope of change for this feature:

  • Create appropriate define jboss::cliexec
  • Puppet rspec tests for define jboss::cliexec
  • Acceptance tests for define jboss::cliexec
  • Smoke tests for define jboss::cliexec
  • Create appropriate type jboss_cliexec and default provider jboss_cliexec/jbosscli for it
  • Ruby rspec tests for type jboss_cliexec and provider jboss_cliexec/jbosscli
  • Deprecate dorestart parameter in jboss::clientry, backing type and providers and change rspec tests
  • Deprecate running and stopped options for ensure property in jboss::clientry, backing type and providers and change rspec tests
  • Change the way that jboss::domain::server is implemented. Use jboss::cliexec instead of dorestart. Also running and stopped options for ensure should be implemented with jboss::cliexec.
  • Documentation changes on README.md and Wiki pages
@cardil
Copy link
Collaborator Author

cardil commented Jan 22, 2016

This feature will give users a way to run any JBoss commands, like in question #38

@Cosaquee
Copy link
Contributor

First of all we need to merge #10 imho.

@cardil
Copy link
Collaborator Author

cardil commented Jan 22, 2016

Yup @Cosaquee. This should be at least v1.1.0 or later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants