GF
Size: a a a
GF
GF
Python 3.7.5 (default, Oct 27 2019, 15:43:29)
[GCC 9.2.1 20191022] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.patch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'sys' has no attribute 'patch'
>>> sys.path
['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.7/dist-packages']
КС
Python 3.7.5 (default, Oct 27 2019, 15:43:29)
[GCC 9.2.1 20191022] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.patch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'sys' has no attribute 'patch'
>>> sys.path
['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.7/dist-packages']
GF
КС
КС
GF
Г
vars:я могу как-то пройти циклом по ним, не выкидывая test1 и test2?
test:
- test1:
test_data: data1
- test2:
test_data: data2
Г
BS
vars:я могу как-то пройти циклом по ним, не выкидывая test1 и test2?
test:
- test1:
test_data: data1
- test2:
test_data: data2
your_action: "{{ item }}"
with_items: {{ test }}
Г
Г
vars:
test:
test1:
test_data: data1
test2:
test_data: data2
tasks:
- name: iterate over dict
action: "{{item.value}}"
with_items: {{test | dict2items}}
КС
vars:
test:
test1:
test_data: data1
test2:
test_data: data2
tasks:
- name: iterate over dict
action: "{{item.value}}"
with_items: {{test | dict2items}}
Г
O
find
?O
find:
paths: "/home/{{ current.user }}"
patterns: '^((?!ansible|ssh).)*$'
excludes:
- '*ssh*'
- '*ansible*'
recurse: True
use_regex: True
register: files_to_cleanup
O
find:
paths: "/home/{{ current.user }}"
patterns: '.*'
excludes:
- '.*ssh.*'
- '.*ansible.*'
recurse: True
use_regex: True
register: files_to_cleanup
O
O
vars:я могу как-то пройти циклом по ним, не выкидывая test1 и test2?
test:
- test1:
test_data: data1
- test2:
test_data: data2
select