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

Incorrect example for icinga2::object::apiuser #448

Closed
mphilipps opened this issue Jun 19, 2018 · 0 comments
Closed

Incorrect example for icinga2::object::apiuser #448

mphilipps opened this issue Jun 19, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@mphilipps
Copy link

hi
icinga2::object::apiuser expects an array of strings or hashes for it's permission argument. The example

permissions = [
  {
    permission = "objects/query/Host"
    filter = {{ regex("^Linux", host.vars.os) }}
  },
  {
    permission = "objects/query/Service"
    filter = {{ regex("^Linux", service.vars.os) }}
  }
]

does neither and as such doesn't work.
I suggest changing it to:

permissions => [
  {
      permission => "objects/query/Host"
    , filter => "{{ regex(\"^Linux\", host.vars.os) }}"
  },
  {
      permission => "objects/query/Service"
    , filter => "{{ regex(\"^Linux\", service.vars.os) }}"
  }
]
@lbetz lbetz self-assigned this Sep 13, 2018
@lbetz lbetz added this to the v2.0.0 milestone Sep 13, 2018
@lbetz lbetz added the bug label Sep 13, 2018
@lbetz lbetz closed this as completed Sep 13, 2018
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