root / techniques / fileDistribution / downloadFile / 1.0 / metadata.xml @ a2c461bb
History | View | Annotate | Download (2.7 kB)
| 1 |
<!--
|
|---|---|
| 2 |
Copyright 2011 Normation SAS
|
| 3 |
|
| 4 |
This program is free software: you can redistribute it and/or modify
|
| 5 |
it under the terms of the GNU General Public License as published by
|
| 6 |
the Free Software Foundation, Version 3.
|
| 7 |
|
| 8 |
This program is distributed in the hope that it will be useful,
|
| 9 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 10 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 11 |
GNU General Public License for more details.
|
| 12 |
|
| 13 |
You should have received a copy of the GNU General Public License
|
| 14 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 15 |
-->
|
| 16 |
|
| 17 |
<!--
|
| 18 |
This is the downloadFile PT.
|
| 19 |
Compatibility : Linux Red Hat like, Debian like
|
| 20 |
|
| 21 |
It is intended to download a file from a curl
|
| 22 |
supported source (such as HTTP) and store it on
|
| 23 |
the given destination.
|
| 24 |
-->
|
| 25 |
|
| 26 |
<TECHNIQUE name="Download a file"> |
| 27 |
<DESCRIPTION>This technique downloads a file from a server.
|
| 28 |
|
| 29 |
It takes a cURL compatible source (HTTP/FTP/...) and a destination on the target host. |
| 30 |
</DESCRIPTION>
|
| 31 |
|
| 32 |
<BUNDLES>
|
| 33 |
<NAME>execute_file_download</NAME> |
| 34 |
</BUNDLES>
|
| 35 |
|
| 36 |
<TMLS>
|
| 37 |
<TML name="downloadFile"/> |
| 38 |
</TMLS>
|
| 39 |
|
| 40 |
<TRACKINGVARIABLE>
|
| 41 |
<SAMESIZEAS>DOWNLOADFILE_SOURCE</SAMESIZEAS> |
| 42 |
</TRACKINGVARIABLE>
|
| 43 |
|
| 44 |
<SECTIONS>
|
| 45 |
<!-- First Section , index 1 -->
|
| 46 |
<SECTION name="Download a file"> |
| 47 |
<INPUT>
|
| 48 |
<NAME>DOWNLOADFILE_SOURCE</NAME> |
| 49 |
<DESCRIPTION>URL to download file from</DESCRIPTION> |
| 50 |
<LONGDESCRIPTION>cURL compatible URL, for example http://server/file or ftp://server/file. cURL will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any means but is instead very liberal with what it accepts.</LONGDESCRIPTION> |
| 51 |
</INPUT>
|
| 52 |
<INPUT>
|
| 53 |
<NAME>DOWNLOADFILE_DESTINATION</NAME> |
| 54 |
<DESCRIPTION>Absolute path to download file to on a node</DESCRIPTION> |
| 55 |
<LONGDESCRIPTION>This path must be absolute, for example /home/foo/file or C:\foo\file</LONGDESCRIPTION> |
| 56 |
</INPUT>
|
| 57 |
</SECTION>
|
| 58 |
|
| 59 |
<!-- Second Section, Linux specific , index 10 -->
|
| 60 |
<SECTION name="UNIX specific parameters"> |
| 61 |
<INPUT>
|
| 62 |
<NAME>DOWNLOADFILE_MODE</NAME> |
| 63 |
<DESCRIPTION>File permissions after download</DESCRIPTION> |
| 64 |
<CONSTRAINT>
|
| 65 |
<TYPE>perm</TYPE> |
| 66 |
<DEFAULT>740</DEFAULT> |
| 67 |
</CONSTRAINT>
|
| 68 |
</INPUT>
|
| 69 |
<INPUT>
|
| 70 |
<NAME>DOWNLOADFILE_USER</NAME> |
| 71 |
<DESCRIPTION>File owner (user)</DESCRIPTION> |
| 72 |
<CONSTRAINT>
|
| 73 |
<DEFAULT>root</DEFAULT> |
| 74 |
</CONSTRAINT>
|
| 75 |
</INPUT>
|
| 76 |
<INPUT>
|
| 77 |
<NAME>DOWNLOADFILE_GROUP</NAME> |
| 78 |
<DESCRIPTION>File owner (group)</DESCRIPTION> |
| 79 |
<CONSTRAINT>
|
| 80 |
<DEFAULT>root</DEFAULT> |
| 81 |
</CONSTRAINT>
|
| 82 |
</INPUT>
|
| 83 |
</SECTION>
|
| 84 |
</SECTIONS>
|
| 85 |
|
| 86 |
</TECHNIQUE>
|