PG
Size: a a a
PG
VD
PG
PG
PG
VD
TG
TG
TG
- name: Load a variable file based on the OS type, or a default if not found
include_vars: '{{ platform_vars }}'
with_first_found:
- '{{ ansible_os_family }}.yml'
- '{{ ansible_distribution }}.yml'
- default.yml
loop_control:
loop_var: platform_vars
- name: Load a variable file based on the service manager
include_vars: '{{ service_manager }}'
with_first_found:
- '{{ ansible_service_mgr }}.yml'
- systemv.yml
loop_control:
loop_var: service_manager
TG
- name: Configure and install packages for current OS
include_tasks: '{{ platform_tasks }}'
with_first_found:
- '{{ ansible_os_family }}.yml'
- not_supported.yml
loop_control:
loop_var: platform_tasks
TG
TG
M
roles/XXX/vars/default.yml
) будут видны в тасках роли без указания в плейбуке c помощью vars_file
?├── roles
│ ├──XXX
│ │ ├── vars
│ │ │ ├── default.yml
│ │ ├── tasks
│ │ │ ├── main.yml
ВГ
roles/XXX/vars/default.yml
) будут видны в тасках роли без указания в плейбуке c помощью vars_file
?├── roles
│ ├──XXX
│ │ ├── vars
│ │ │ ├── default.yml
│ │ ├── tasks
│ │ │ ├── main.yml
M
M
ВГ
M
vars_file
указывать полный путь от плейбука?SP
vars_file
указывать полный путь от плейбука?M