Skip to content

Instantly share code, notes, and snippets.

@noahcampbell
Created May 23, 2011 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahcampbell/987195 to your computer and use it in GitHub Desktop.
Save noahcampbell/987195 to your computer and use it in GitHub Desktop.
entity-query.xml
<apply-macro>
<entityquery select="default.name,default.type,default.description,default.selectedResourceTags,default.osFamily,default.osName,default.osArch,default.osVersion,default.hostname,default.ctlUsername,site.name,site.type" depot="${context.depot}">
<typerestriction typeName="Node"/>
<relationrestriction name="resources" matchKey="site">
<typerestriction typeName=".*(Site|Service)" regex="true"/>
</relationrestriction>
</entityquery>
<sequential>
<propertyregex property="tags" override="true" input="@{default.selectedResourceTags}" regexp="\[(.*)\]" select="\1"/>
<echo append="true" file="${opts.rundeckresourcesfile}">&lt;node name="@{default.name}" type="@{default.type}" description="@{default.description}" tags="${tags} @{site.name}:@{site.type}" hostname="@{default.hostname}" osArch="@{default.osArch}" osFamily="@{default.osFamily}" osName="@{default.osName}" osVersion="@{default.osVersion}" username="@{default.ctlUsername}" editUrl="" remoteUrl=""/&gt;${line.separator}</echo>
</sequential>
</apply-macro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment