Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>remotes/origin/1.5
commit
cd1a1347c9
@ -0,0 +1,58 @@ |
||||
#!/bin/sh |
||||
# |
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org) |
||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc) |
||||
# |
||||
# 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/>. |
||||
# |
||||
# |
||||
# For the given object: |
||||
# - run type explorers |
||||
# - generate code |
||||
# - copy object to target |
||||
# - execute code on target |
||||
# |
||||
|
||||
. cdist-config |
||||
[ $# -eq 2 ] || __cdist_usage "<target host> <object>" |
||||
set -eu |
||||
|
||||
__cdist_target_host="$1"; shift |
||||
__cdist_object="$1"; shift |
||||
|
||||
|
||||
__cdist_type="$(__cdist_type_from_object "$__cdist_object")" |
||||
|
||||
# Check if type of object has >= 1 explorer |
||||
__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" |
||||
|
||||
# Run the type explorers for the current object if any |
||||
if [ "$__cdist_has_explorer" ]; then |
||||
cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" |
||||
fi |
||||
|
||||
# Run the manifest for the current object |
||||
cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" |
||||
|
||||
# Run the gencode scripts for the current object |
||||
cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" |
||||
|
||||
# Transfer the current object to the target |
||||
cdist-object-push "$__cdist_target_host" "$__cdist_object" |
||||
|
||||
# Run the code for the current object |
||||
cdist-object-code-run "$__cdist_target_host" "$__cdist_object" |
||||
|
@ -0,0 +1,16 @@ |
||||
- document object_id=$1 for manifest + gencode :-) |
||||
|
||||
- update docs regarding flow in cdist-stages.text |
||||
- create man pages for new executables |
||||
- nuke legacy manpages |
||||
|
||||
- prettify output of cdist-deploy-to, e.g. |
||||
|
||||
Processing object __file/etc/cdist-configured |
||||
transfering type explorers ... |
||||
running type explorers ... |
||||
running manifest ... |
||||
running gencode ... |
||||
transfering object to target ... |
||||
running code ... |
||||
|
@ -1,32 +0,0 @@ |
||||
cdist-code-run-all(1) |
||||
===================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-code-run-all - Execute all generated code on the target |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-code-run-all HOSTNAME |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
cdist-code-run-all is just a wrapper for cdist-remote-code-run-all. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-deploy-to(1) |
||||
- cdist-remote-code-run-all(1) |
||||
- cdist-run-remote(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,33 @@ |
||||
cdist-object-code-run(1) |
||||
======================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-code-run - Execute the generated code for a object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-code-run HOSTNAME OBJECT |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Execute the local and remote code for the given object. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-object-run-all(1) |
||||
- cdist-code-run(1) |
||||
- cdist-run-remote(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -1,33 +0,0 @@ |
||||
cdist-object-explorer-all(1) |
||||
============================ |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-explorer-all - Run type explorer for every object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-explorer-all HOSTNAME |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
For every object, it checks whether the type has one or more explorers. |
||||
If so, the explorers of the type are copied to the target and executed |
||||
once per object. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-deploy-to(1) |
||||
- cdist-remote-explorer-run(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,32 @@ |
||||
cdist-object-explorer-run(1) |
||||
============================ |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-explorer-run - Run type explorers for a object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-explorer-run HOSTNAME OBJECT |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Runs the explorers for the given object on the target host. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-deploy-to(1) |
||||
- cdist-remote-explorer-run(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -1,32 +0,0 @@ |
||||
cdist-object-gencode-all(1) |
||||
=========================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-gencode-all - Generate code for every existing object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-gencode-all HOSTNAME |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
For every object that exists, the cdist-object-gencode is executed. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-code-run(1) |
||||
- cdist-deploy-to(1) |
||||
- cdist-object-gencode(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,33 @@ |
||||
cdist-object-gencode-run(1) |
||||
=========================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-gencode-run - Generate code for a object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-gencode-run HOSTNAME OBJECT |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
For the given object, generate the code for local and remote execution. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-code-run(1) |
||||
- cdist-object-run-all(1) |
||||
- cdist-object-gencode(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,32 @@ |
||||
cdist-object-push(1) |
||||
==================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-push - Transfer a object to the target host |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-push HOSTNAME OBJECT |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Transfers the given object to the target host. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-object-run-all(1) |
||||
- cdist-type(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,34 @@ |
||||
cdist-object-run-all(1) |
||||
======================= |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-run-all - Run all created objects on the target host |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-run-all HOSTNAME |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Transfers type explorers to the target then runs cdist-object-run(1) |
||||
for each created object. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-type-explorer-push(1) |
||||
- cdist-object-run(1) |
||||
- cdist-type(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,37 @@ |
||||
cdist-object-run(1) |
||||
=================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-object-run - Run an object |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-object-run HOSTNAME OBJECT |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Runs the given object on the given target host. |
||||
The different subtasks are dispatched to specialized exectuables. |
||||
See related man pages for details. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-object-explorer-run(1) |
||||
- cdist-object-gencode-run(1) |
||||
- cdist-object-push(1) |
||||
- cdist-object-code-run(1) |
||||
- cdist-type(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,32 @@ |
||||
cdist-type-explorer-push(1) |
||||
=========================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
Steven Armstrong <steven-dist--@--armstrong.cc> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type-explorer-push - Transfer type explorers to the target host |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-type-explorer-push HOSTNAME TYPE |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Transfers the explorers of the given type to the target host. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-object-run(1) |
||||
- cdist-type(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
Loading…
Reference in new issue