Ask Your Question
0

Stop service using PQL

asked 2018-12-02 21:51:31 -0600

Chutki gravatar image

Hi,

I would like to query and stop "mcollective" service using PQL

  resources[certname] { type = "Service" and title = "httpd" }

Sample

resources[node1.test.com] { type = "Service" and title = "mcollective" }

I am not sure what attribute need to pass to stop service.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-15 06:41:59 -0600

You can't. Puppet query language is a mere query language. You can query data, but cannot manipulate any.

The action, what you do with the list of returned certname, is specified in the corresponding context where you enter your PQL query.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-02 21:51:31 -0600

Seen: 163 times

Last updated: Dec 15