Resource definitions in YAML
-
Greg Schueler
- Assigned user set to Greg Schueler
question: should the node name only be specified via the top level map's key? if so, should a "nodename" value in the node data be ignored?
-
Deleted User
I think it should. I don't know if we have plans for a lint checker, but that would be a good rule to add to resource lint.
-
Greg Schueler
an alternate format would be like this: https://gist.github.com/27b46f8fd8cd67750d8e
so the nodename is a data element in the map, and nodes are just maps in a sequence
-
Deleted User
What would it look like in block mode?
-
Greg Schueler
sequence based in flow mode would be like this:
[{nodename: x, hostname, y}, {nodename: z, hostname, w} .. ]
as opposed to map based:
{ x: {hostname:y}, z: {hostname:w}}
it is more compact in that mode.
-
Deleted User
Ah...how about this, lets say I have a list of IP address. 10.168.0.1, 10.168.0.2, 10.168.0.3.
What if instead of making the nodename the map name, we made it the hostname.
Then converting a list would be as easy as:
- 10.168.0.1 - 10.168.0.2 - 10.168.0.3(Easily append the '- ' with
sed -i -e '/^/- /' filelist.txt)And adding metadata would be:
- 10.168.0.1: {nodename: foobar} - 10.168.0.2: {nodename: barbaz} - 10.168.0.3: {nodename: bazfoo}Just a thought.
-
Greg Schueler
hmm I see the utility. Even ideally you could just do
- 10.168.0.1 - 10.168.0.2and have it be valid. i suppose using hostname as default for the node name
(and vice-versa?) is useful.but it makes the data structure awkward: a sequence of maps of maps. in
block mode it seems more awkward:- 10.168.0.1: nodename: blah username: xsequence of name based maps is a little better, but not as easy to get from
just hostnames:name1: { hostname: 10.168.0.1 } name2: { hostname: 10.168.0.2 }I will push what I have (original requested format) to dev and we can play
with it -
Greg Schueler
pushed initial version. this supports the nodename keyed map, as well as a sequence of maps (for comparison).
to use, modify project.properties and change the project.resources.file to use a ".yaml" extension
e.g.
project.resources.file = /Users/greg/rundeck11/projects/test/etc/resources.yaml -
Greg Schueler
- State changed from new to open
-
Deleted User
(from [e8f857208bd195e7a30ecc9de8c87d06fb4c0049]) Support editUrl/remoteUrl in nodes YAML format [#173 Resource definitions in YAML] https://github.com/dtolabs/rundeck/commit/e8f857208bd195e7a30ecc9de...
-
Greg Schueler
- State changed from open to resolved
- Milestone order changed from 15 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.