New type: __nop

This commit is contained in:
fancsali 2021-01-18 18:52:34 +00:00
parent 7cf85c4659
commit 5ed643e7c2
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/bin/sh -e
#
# 2021 Daniel Fancsali (fancsali@gmail.com)
#
# This file is part of cdist.
#
# cdist is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cdist is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
echo "All your base are belong to us." >&2

View File

@ -0,0 +1,54 @@
cdist-type__nop(7)
==================
NAME
----
cdist-type__nop - Do nothing.
DESCRIPTION
-----------
This type will literally do nothing; it's sole purpose is to provide an 'anchor point' in case one would have an empty manifest, but still needs to specify some dependencies.
The only thing that one needs to specify is some kind of object name, which will be simply ignored.
It is advisible, though, to provide a name based on the parent object's id, so to make this call unique.
REQUIRED PARAMETERS
-------------------
None.
OPTIONAL PARAMETERS
-------------------
None.
BOOLEAN PARAMETERS
------------------
None.
EXAMPLES
--------
.. code-block:: sh
require="__othertype/foo" __nop $__object_id # Use parent object's id to make the name unique
SEE ALSO
--------
*Nothing to see here...*
AUTHORS
-------
Daniel Fancsali <fancsali@gmail.com>
COPYING
-------
Copyright \(C) 2021 Daniel Fancsali. You can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.