Puppet: различия между версиями

Содержимое удалено Содержимое добавлено
Строка 179:
* '''backup''' — Нужно ли делать бэкап файла перед его заменой. Равно ''false'' (не надо делать резервной копии), ''.ваш_текст_начинающийся_с_точки'' (сделает резервную копию в том же месте где и был файл добавлением к нему суффикса ''.ваш_текст_начинающийся_с_точки''), ''ваш_текст_без_точки_вначале'' (сархивирует в filebucket с именем ''ваш_текст_без_точки_вначале'').
* '''force''' — позволяет выполнить операцию даже если она уничтожит одну или несколько директорий. Требуется использовать: совместно с параметром ''purge'' (будут также удаляться и поддиректории), когда необходимо заменить директорию файлом или ссылкой, и когда удаляется директория (''ensure => absent''). Равно ''true'' или ''false''.
* '''checksum''' — Алгоритм подсчета контрольной суммы при определении изменения содержимого файла.<br />Значение по умолчанию: ''md5''.<br />Возможные значения: ''md5'', ''md5lite'', ''mtime'', ''ctime'', ''none''.
* Также: checksum, ignore, links, provider, recurselimit, replace, selrange, selrole, seltype, seluser, sourceselect, type.
* '''ignore''' — Параметр определяющий игнорируемые файлы при рекурсивной обработке каталога.<br/> Используется стандартный встроенный движок ruby. К примеру полностью поддерживаются метасимволы вроде ''[a-z]*''.<br/> Совпадения исползующие вхождение в подкаталоги, вроде ''*/*'', игнорируются (**в оригинале: Matches that would descend into the directory structure are ignored, e.g., ''*/*'').
* '''links''' — Как обрабатывать символические ссылки во время обработки файлов.<br/> Возможные значения:
** ''follow'' — будет скопирован указанный по ссылке файл
** ''manage'' — будет скопирована сама ссылка
** ''ignore'' — ссылка будет проигнорирована
* '''provider''' — Конкретный бэкенд используемый этим ресурсом. Скорее всего вам не придется использовать этот параметр, т.к. puppet определит этот параметр в соответствии с платформой<br/>
Возможные значения: ''posix'', ''windows''
* '''replace''' — Заменить ли файл или символическую ссылку, которая уже существует в локальной системе, но содержание которого не соответствует тому, что источник или содержание атрибут определяет.<br/>Установка этого значения в false позволяет инициализировать файловые ресурсы без перезаписи при изменениях в будущем.<br/>Обратите внимание, что это влияет только на содержимое; Puppet будет по-прежнему управлять владельца и права.<br/>Значение по умолчанию ''true''.<br/>Возможные значения ''true'', ''false'', ''yes'', ''no''.
* '''selinux_ignore_defaults''' — If this is set then Puppet will not ask SELinux (via matchpathcon) to supply defaults for the SELinux attributes (seluser, selrole, seltype, and selrange). In general, you should leave this set at its default and only set it to true when you need Puppet to not try to fix SELinux labels automatically. Valid values are ''true'', ''false''.
* '''selrange''' — (Property: This attribute represents concrete state on the target system.) What the SELinux range component of the context of the file should be. Any valid SELinux range component is accepted. For example s0 or SystemHigh. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled and that have support for MCS (Multi-Category Security).
* '''selrole''' — (Property: This attribute represents concrete state on the target system.) What the SELinux role component of the context of the file should be. Any valid SELinux role component is accepted. For example role_r. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
* '''seltype''' — (Property: This attribute represents concrete state on the target system.) What the SELinux type component of the context of the file should be. Any valid SELinux type component is accepted. For example tmp_t. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
* '''seluser''' — (Property: This attribute represents concrete state on the target system.) What the SELinux user component of the context of the file should be. Any valid SELinux user component is accepted. For example user_u. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
* '''show_diff''' — Отображать ли различия при изменении файла. Значение по умолчанию ''true''. Этот параметр полезен для файлов включающих пароли, и другие секретные данные, которые в противном случае были бы включены в логи Puppet, и другие небезопасные выводы.<br/>
Если глобальный параметр `show_diff` равен ''false'', то различия не будут отображаться даже если далее он будет объявлен как ''true''.<br/>Возможные значения ''true'', ''false'', ''yes'', ''no''.
* '''source''' — Источник, из которого будут копироваться данные в локальную систему. Значением могут быть как URI к удаленным файлам, так и полные пути в локальной системе (в т.ч. и в
подключенных NFS и Samba шарах)<br/> Этот атрибут является взаимоисключающим с ''content'' и ''target''.<br/> Доступные URI могут быть ''puppet'' and ''file''.<br/> ''Puppet'' URI будут брать файлы из встроенного в puppet файлового сервера, и как правило имеют формат:
puppet:///modules/name_of_module/filename
При этом будут взяты файлы из модуля на puppet-master-е(или локального модуля, при использовании pupper apply).<br/> Given a ''modulepath'' of ''/etc/puppetlabs/puppet/modules'', the example above would resolve to
/etc/puppetlabs/puppet/modules/name_of_module/files/filename.
Unlike ''content'', the ''source'' attribute can be used to recursively copy directories if the ''recurse'' attribute is set to ''true'' or ''remote''. If a source directory contains symlinks, use the links attribute to specify whether to recreate links or follow them.
Multiple ''source'' values can be specified as an array, and Puppet will use the first source that exists. This can be used to serve different files to different system types:
file { "/etc/nfs.conf":
source => [
"puppet:///modules/nfs/conf.$host",
"puppet:///modules/nfs/conf.$operatingsystem",
"puppet:///modules/nfs/conf"
]
}
Alternately, when serving directories recursively, multiple sources can be combined by setting the ''sourceselect'' attribute to ''all''.
* '''source_permissions''' — Whether (and how) Puppet should copy owner, group, and mode permissions from the ''source'' to ''file'' resources when the permissions are not explicitly specified. (In all cases, explicit permissions will take precedence.) Valid values are ''use'', ''use_when_creating'', and ''ignore'':
** ''use'' (the default) will cause Puppet to apply the owner, group, and mode from the ''source'' to any files it is managing.
** ''use_when_creating'' will only apply the owner, group, and mode from the ''source'' when creating a file; existing files will not have their permissions overwritten.
** ''ignore'' will never apply the owner, group, or mode from the ''source'' when managing a file. When creating new files without explicit permissions, the permissions they receive will depend on platform-specific behavior. On POSIX, Puppet will use the umask of the user it is running as. On Windows, Puppet will use the default DACL associated with the user it is running as.
Valid values are ''use'', ''use_when_creating'', ''ignore''.
 
 
* '''sourceselect''' —
* '''type''' —
 
=== package ===