??????????????
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 d Z d Z d Z d d l Z d d l
Z
d d l m Z d d l
m Z d d l m Z m Z d e f d
„ ƒ YZ d S( i ( t absolute_importt divisiont print_functions
lookup: fileglob
author: Michael DeHaan
version_added: "1.4"
short_description: list files matching a pattern
description:
- Matches all files in a single directory, non-recursively, that match a pattern.
It calls Python's "glob" library.
options:
_terms:
description: path(s) of files to read
required: True
notes:
- Patterns are only supported on files, not directory/paths.
- Matching is against local system files on the Ansible controller.
To iterate a list of files on a remote node, use the M(find) module.
- Returns a string list of paths joined by commas, or an empty list if no files match. For a 'true list' pass C(wantlist=True) to the lookup.
s/
- name: Display paths of all .txt files in dir
debug: msg={{ lookup('fileglob', '/my/path/*.txt') }}
- name: Copy each file over that matches the given pattern
copy:
src: "{{ item }}"
dest: "/etc/fooapp/"
owner: "root"
mode: 0600
with_fileglob:
- "/playbooks/files/fooapp/*"
s1
_list:
description:
- list of files
N( t
LookupBase( t AnsibleFileNotFound( t to_bytest to_textt LookupModulec B` s e Z d d „ Z RS( c K` s4 g } x'| D]} t j j | ƒ } g } | | k rb | j | j | d t j j | ƒ ƒ ƒ ne d | k r{ | d } n | j | ƒ g } x7 | D]/ } | j t j j | d ƒ ƒ | j | ƒ q” Wxb | D]Z }
|
rÎ t j t t j j |
| ƒ d d ƒƒ } | j
d „ | Dƒ ƒ | r(Pq(qÎ qÎ Wq
W| S( Nt filest ansible_search_patht errorst surrogate_or_strictc s` s3 | ]) } t j j | ƒ r t | d d ƒVq d S( R
R N( t ost patht isfileR ( t .0t g( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/lookup/fileglob.pys M s ( R R
t basenamet appendt find_file_in_search_patht dirnamet get_basedirt joint globR t extend( t selft termst variablest kwargst rett termt term_filet found_pathst pathst pt dwimmed_patht globbed( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/lookup/fileglob.pyt run8 s&