??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
ßUdac @` sö d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z d d
l
Z
d d
l Z d d
l Z d d l
m Z d d l m Z m Z d d
l m Z d
d
e d
d „ Z d
d „ Z d „ Z e d k rò e ƒ n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont stableinterfacet statust coret supported_bysj
---
module: assemble
short_description: Assemble configuration files from fragments
description:
- Assembles a configuration file from fragments.
- Often a particular program will take a single configuration file and does not support a
C(conf.d) style structure where it is easy to build up the configuration
from multiple sources. C(assemble) will take a directory of files that can be
local or have already been transferred to the system, and concatenate them
together to produce a destination file.
- Files are assembled in string sorting order.
- Puppet calls this idea I(fragments).
version_added: '0.5'
options:
src:
description:
- An already existing directory full of source files.
type: path
required: true
dest:
description:
- A file to create using the concatenation of all of the source files.
type: path
required: true
backup:
description:
- Create a backup file (if C(yes)), including the timestamp information so
you can get the original file back if you somehow clobbered it
incorrectly.
type: bool
default: no
delimiter:
description:
- A delimiter to separate the file contents.
type: str
version_added: '1.4'
remote_src:
description:
- If C(no), it will search for src at originating/master machine.
- If C(yes), it will go to the remote/target machine for the src.
type: bool
default: no
version_added: '1.4'
regexp:
description:
- Assemble files only if C(regex) matches the filename.
- If not set, all files are assembled.
- Every "\" (backslash) must be escaped as "\\" to comply to YAML syntax.
- Uses L(Python regular expressions,http://docs.python.org/2/library/re.html).
type: str
ignore_hidden:
description:
- A boolean that controls if files that start with a '.' will be included or not.
type: bool
default: no
version_added: '2.0'
validate:
description:
- The validation command to run before copying into place.
- The path to the file to validate is passed in via '%s' which must be present as in the sshd example below.
- The command is passed securely so shell features like expansion and pipes won't work.
type: str
version_added: '2.0'
seealso:
- module: copy
- module: template
- module: win_copy
author:
- Stephen Fromm (@sfromm)
extends_documentation_fragment:
- decrypt
- files
sý
- name: Assemble from fragments from a directory
assemble:
src: /etc/someapp/fragments
dest: /etc/someapp/someapp.conf
- name: Inserted provided delimiter in between each fragment
assemble:
src: /etc/someapp/fragments
dest: /etc/someapp/someapp.conf
delimiter: '### START FRAGMENT ###'
- name: Assemble a new "sshd_config" file into place, after passing validation with sshd
assemble:
src: /etc/ssh/conf.d/
dest: /etc/ssh/sshd_config
validate: /usr/sbin/sshd -t -f %s
N( t
AnsibleModule( t bt
indexbytes( t to_nativec C` s£ t j d | ƒ \ } } t j | d ƒ } t } t } x\t t j | ƒ ƒ D]E}
| rn | j |
ƒ rn qL n t j j | |
ƒ } t j j
| ƒ sL | r½ t j j | ƒ j d ƒ r½ qL n t
| d ƒ } | j ƒ }
Wd QX| rý | j t d ƒ ƒ n | rZ| rZt j | ƒ d } | j | ƒ t | d ƒ d k rW| j t d ƒ ƒ qWqZn | j |
ƒ t } |
j t d ƒ ƒ r‹t } qL t } qL W| j ƒ | S(
s/ assemble a file from a directory of fragments t dirt wbt .t rbNs
i iÿÿÿÿi
( t tempfilet mkstempt ost fdopent Falset sortedt listdirt searcht patht joint isfilet basenamet
startswitht opent readt writeR t codecst
escape_decodeR
t Truet endswitht close( t src_patht delimitert compiled_regexpt
ignore_hiddent tmpdirt tmpfdt temp_patht tmpt
delimit_met add_newlinet ft fragmentt fragment_fht fragment_content( ( sB /usr/lib/python2.7/site-packages/ansible/modules/files/assemble.pyt assemble_from_fragmentsx s6 4
c C` sr t j j | ƒ rn y t j | ƒ Wqn t t f k
rj } | d k rk d | t | ƒ f g | d