Skip to content

Instantly share code, notes, and snippets.

@DBMoUK
Created May 23, 2014 16:21
Show Gist options
  • Save DBMoUK/e4e149282a9b3fcb2318 to your computer and use it in GitHub Desktop.
Save DBMoUK/e4e149282a9b3fcb2318 to your computer and use it in GitHub Desktop.
curl -X PUT -H 'Content-Type: application/json' \
-d '{
"id": "ddab2071-26ea-4261-af09-7b6b97fa04d2",
"name": "qa_group",
"environment": "dev",
"parent": "00000000-0000-4000-8000-000000000000",
"rule": [
"~",
"name",
"ntpagent[0.9].puppetlabs\\.vm$"
],
"classes": {
"ntp": {
"preferred_servers": [
"0.uk.pool.ntp.org"
],
"variables": {
"ntpservers": [
"0.uk.pool.ntp.org",
"1.uk.pool.ntp.org"
]
}
}
}
}' \
http://localhost:1261/v1/groups/ddab2071-26ea-4261-af09-7b6b97fa04d2
{"details":[{"kind":"missing-class","group":"qa_group","missing":"ntp","environment":"dev","defined-by":"qa_group"}],"kind":"missing-referents","msg":"A class or class parameter that the group defines or inherits does not exist in the group's environment. See the `details` key for a list of the specific errors."}
@praxxis
Copy link

praxxis commented May 23, 2014

Variables at top level:

{
    "id": "ddab2071-26ea-4261-af09-7b6b97fa04d2",
    "name": "qa_group",
    "environment": "dev",
    "parent": "00000000-0000-4000-8000-000000000000",
    "rule": [
        "~",
        "name",
        "ntpagent[0.9].puppetlabs\\.vm$"
    ],
    "classes": {
        "ntp": {
            "preferred_servers": [
                "0.uk.pool.ntp.org"
            ]
        }
    },
    "variables": {
        "ntpservers": [
            "0.uk.pool.ntp.org",
            "1.uk.pool.ntp.org"
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment