{"id":342510,"date":"2022-12-13T09:02:36","date_gmt":"2022-12-13T09:02:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=342510"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=342510","title":{"rendered":"<span>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0438 Ansible<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0438 \u0447\u0430\u0449\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Ansible \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043e\u043a \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u0438 \u0433\u0440\u0430\u0431\u043b\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0433\u0440\u0435\u0441\u0442\u0438 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u0431\u0435\u0437 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u043d\u0438\u0431\u0443\u0442\u0430 \u0438\u043b\u0438 \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e \u043c\u043e\u0449\u043d\u0435\u0435. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u043d\u0437\u0438\u0431\u043b\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c inventory. \u041c\u043d\u0435 \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043b\u044e\u0434\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u044e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0430 \u0435\u0441\u043b\u0438 \u0438 \u0447\u0438\u0442\u0430\u044e\u0442, \u0442\u043e \u0443\u043c\u0443\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043d\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Ansible. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Python \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u0437\u044b\u043a.<\/p>\n<hr\/>\n<h2>\u0414\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445<\/h2>\n<p>\u0422\u0435, \u043a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u043a \u043a\u043e\u0434\u0443, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/gist.github.com\/onegreyonewhite\/fc4de39b86a0bfa2cdf656ef57081600\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <\/a>gist \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c):<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python  \"\"\" This is an example script for implementing dynamic inventory in Ansible. It could have been written in bash, but python is much easier to read. \"\"\"  import argparse import json  # Example hosts store store = {     \"postgres-1\": {         \"metadatafromstore\": {             \"ip\": ['172.16.1.1'],             'discs': ['\/dev\/vda', '\/dev\/sda'],             'users': ['grey'],             'mounts': {                 \"\/\": '\/dev\/vda',                 \"\/opt\/postgres\/data\": \"\/dev\/sda\",             },         }     },     \"apache\": {         \"metadatafromstore\": {             \"ip\": ['172.16.1.3'],             'discs': ['\/dev\/vda'],             'mounts': {                 \"\/\": '\/dev\/vda',             },         }     }, }   def get_host_vars(host):     data = {         'ansible_host': host,         'ansible_user': 'root',     }     if host in store:         metadata = store[host].get('metadatafromstore', {}) or {}         if metadata.get('ip'):             data['ansible_host'] = metadata['ip'][0]         if 'users' in metadata:             data['ansible_user'] = metadata['users'][0]         data.update(metadata)     return data   def get_vars(host, pretty=False):     \"\"\"     Function which return json data of host's variables.     \"\"\"     return json.dumps({}, indent=pretty)   def get_list(pretty=False):     \"\"\"     Function which return inventory data for hosts.     Example contains all variants of groups. Syntax as yaml inventory but with '_meta' section.      - 'hostvars' is all variables for hosts.     - 'all' is default group which should be always created.     - 'ungrouped' is testing group with hosts.     \"\"\"     hostvars, ungrouped = {}, []      for host in store:         ungrouped.append(host)         hostvars[host] = get_host_vars(host)      data = {         '_meta': {           'hostvars': hostvars         },         'all': {             'children': [                 'ungrouped'             ]         },         'ungrouped': {             'hosts': ungrouped         }     }     return json.dumps(data, indent=pretty)   # Parse arguments. # Ansible require two: '--list' and output of all data and '--host [hostname] for getting variables about one host' parser = argparse.ArgumentParser() parser.add_argument(     '--pretty',     action='store_true',     default=False,     help=\"Pretty print JSON\" ) parser.add_argument(     \"--list\",     action='store',  # also better use store_true     nargs=\"*\",     default=\"dummy\",     help=\"Show JSON of all managed hosts\" ) parser.add_argument(     \"--host\",     action='store',     help=\"Display vars related to the host\" ) args = parser.parse_args()  # Print output will be parsed via ansible as inventory (like a file). if args.host:     print(get_vars(args.host, args.pretty)) elif len(args.list) >= 0:     print(get_list(args.pretty)) else:     raise ValueError(\"Expecting either --host $HOSTNAME or --list\")<\/code><\/pre>\n<h2>\u0422\u0435\u043e\u0440\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0451\u043d\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u042f\u041f, \u043b\u0443\u0447\u0448\u0438\u043c \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043e\u0440\u0438\u0438.<\/p>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0435\u0432<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 cli \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 ansible, \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439 \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 ansible.cfg (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430, \u043d\u043e \u044d\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e). \u0412 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;:<\/p>\n<pre><code>[inventory] enable_plugins = host_list, script, auto, yaml, ini, toml<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443: \u0441\u043f\u0435\u0440\u0432\u0430 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0445\u043e\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e, \u043f\u043e\u0442\u043e\u043c \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u043f\u043e\u043a\u0430 %username% \u043d\u0435 \u043f\u043e\u0448\u0451\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0435\u043d\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041e\u043d \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0444\u0430\u0439\u043b, \u043f\u043e\u0442\u043e\u043c \u0447\u0438\u0442\u0430\u0435\u0442 \u0432 \u043d\u0451\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 plugin \u0438 \u0443\u0436\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043d\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u043c \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u043d\u0437\u0438\u0431\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d.<\/p>\n<\/div>\n<\/details>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u044c, \u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 yaml \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u0438\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u0442\u043e \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 (\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438\u043b\u0438 \u0444\u0430\u0439\u043b), \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041f\u0435\u0440\u0432\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0432\u0448\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0441\u0442\u043e\u044f\u0442 \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d script<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439.<\/p>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u0424\u0430\u0439\u043b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <code>#!<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u043a\u043b\u0430\u0434\u0451\u0442\u0435 \u0431\u0438\u043d\u0430\u0440\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432\u0441\u0435\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c. \u041f\u0430\u0440\u0443 \u0440\u0430\u0437 \u043d\u0430\u0442\u044b\u043a\u0430\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0438\u043c\u0435\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--list<\/code>, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0438\u0437 \u043f\u0430\u0439\u043f\u0430, \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u043c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0417\u0430\u0442\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--host \u0438\u043c\u044f_\u0445\u043e\u0441\u0442\u0430<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430. \u041d\u0430\u0441\u0447\u0451\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u0441\u0443\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u0430. \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h2>\u0420\u0430\u0437\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0434\u0442\u0438 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0442.\u0435. \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u0447\u0442\u043e\u0431 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f).<\/p>\n<h4>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/h4>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0443. \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0437\u0430 Python, \u0442\u043e \u0442\u0443\u0442 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 &#171;\u0438\u0437 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a&#187; \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>argparse<\/code>. \u042f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u0438\u0431\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u041d\u043e \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u044b \u0434\u0432\u0435 \u0432\u0435\u0449\u0438.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 <code>--list<\/code> \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443. \u0412\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u041d\u0435 \u0440\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u044f \u0446\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e. \u041b\u0443\u0447\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>action=\"store_true\"<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0441 \u044d\u0442\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0422\u0430\u043a\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 (\u0432\u044b\u0432\u043e\u0434 \u0432 json):<\/p>\n<pre><code class=\"json\">{   \"_meta\": {     \"hostvars\": {} \/\/ \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 - \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - json object \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438   },   \"all\": {} \/\/ \u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0443 \u043d\u0430\u0441 \u0438\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0445\u043e\u0441\u0442\u043e\u0432. }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b, \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/inventory_guide\/intro_inventory.html#inventory-basics-formats-hosts-and-groups\" rel=\"noopener noreferrer nofollow\">yaml \u043f\u043b\u0430\u0433\u0438\u043d<\/a>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430. \u041d\u043e \u0432\u0441\u0451 \u0436\u0435 \u044f \u0443\u0442\u043e\u0447\u043d\u044e.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 json \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043a\u043b\u044e\u0447 &#8212; \u0438\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u044b, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u0434\u0430\u043d\u043d\u044b\u0435). \u041a\u0430\u0436\u0434\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0432 \u0441\u0435\u0431\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><code>vars<\/code> &#8212; \u043d\u0430\u0431\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430\u0431\u043e\u0440: \u043a\u043b\u044e\u0447 &#8212; \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><code>hosts<\/code> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a (\u0438\u043c\u0435\u043d\u043d\u043e list) \u0438\u043c\u0451\u043d \u0445\u043e\u0441\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435. \u041d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u041a\u0430\u0436\u0434\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u0445\u043e\u0441\u0442 \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><code>children<\/code> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0451\u043d \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c: \u043b\u0438\u0431\u043e \u0443 \u0432\u0430\u0441 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430, \u043b\u0438\u0431\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0445\u043e\u0441\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0451\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0442\u0430\u043a\u0436\u0435 \u0432 json \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043a\u043e\u0434\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0445\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u044d\u0442\u043e \u041d\u0415 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>hosts<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442: <code>{\"all\": [\"host1\", \"host2\"]}<\/code>, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0443\u043f\u043f\u0443 all \u0441 \u0445\u043e\u0441\u0442\u0430\u043c\u0438. \u042d\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c. \u0412 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u043e\u0442 \u0445\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u043e\u0439 \u0441 \u0445\u043e\u0441\u0442\u043e\u043c, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0445\u043e\u0441\u0442\u0430. \u0412\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043e\u0434, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0443\u0442\u0430\u0435\u0442, \u0447\u0435\u043c \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044f\u0432\u043d\u044b\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0433\u0440\u0443\u043f\u043f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>_meta<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>hostvars<\/code>. \u042d\u0442\u043e \u043d\u0435 \u0433\u0440\u0443\u043f\u043f\u0430, \u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, <code>hostvars<\/code> \u0431\u0443\u0434\u0435\u0442 <code>None<\/code>, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445 \u0432 <code>_meta<\/code> \u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0432 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 <code>hostvars<\/code>. \u041a\u043b\u044e\u0447 \u0432 <code>hostvars<\/code> &#8212; \u044d\u0442\u043e \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 <code>hostvars<\/code> \u0432 \u043d\u0430\u0448\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0435, \u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 <code>--host hostname<\/code>. \u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043a\u043e\u0434 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 ansible 2.9, \u044f \u0443\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 <code>hostvars<\/code>, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043e\u0432\u0441\u0435\u043c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0451 \u0436\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435, \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0445\u043e\u0441\u0442\u0430 \u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 json \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0412 \u0446\u0435\u043b\u043e\u043c \u044f \u043d\u0435 \u0437\u043d\u0430\u044e \u043a\u0435\u0439\u0441\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u0442\u043e \u0431\u044b \u0431\u044b\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e (\u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u0438 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432). \u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0441\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0435\u0451 \u043d\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c. \u0412 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0441\u0442\u044b\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0435 \u0443\u043c\u0435\u0449\u0430\u043b\u0441\u044f \u0431\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u0442\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c.<\/p>\n<h4>\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/h4>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u044b), cobbler, OpenStack \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0431\u043b\u0430\u043a\u043e. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<p>\u0412 \u0433\u0438\u0442\u0445\u0430\u0431\u0435 \u0430\u043d\u0437\u0438\u0431\u043b\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u041d\u043e \u043e\u043d\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b, \u0447\u0442\u043e \u0438 \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e. <a href=\"https:\/\/github.com\/ansible\/ansible\/tree\/stable-2.9\/contrib\/inventory\" rel=\"noopener noreferrer nofollow\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e, \u0430 \u0433\u0434\u0435-\u0442\u043e \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a<\/h4>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0441\u044f \u043d\u0430 <code>#!<\/code>, \u0447\u0442\u043e \u0432 linux \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0432 fs acl \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0442\u043e\u043c \u0436\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u0447\u0442\u043e \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 ansible \u0438\u043b\u0438 \u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<hr\/>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0442\u043e, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d ansible-\u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0435\u0432 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432: <code>script_name --list<\/code>. \u041f\u0440\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0439 \u0441\u043d\u043e\u0440\u043e\u0432\u043a\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043a\u0430\u043a \u043a\u043e\u0434\u043e\u043c \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0440\u0435\u0434\u0435. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 &#171;\u043f\u043e\u0440\u0442\u044f\u043d\u043e\u043a&#187; YAML-\u0435\u0439 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0435\u0437\u0434\u0435 \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 ansible. \u0421\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430 bash, ruby, js \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043e\u0431\u0451\u0440\u0442\u043a\u043e\u0439 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0431\u0438\u043d\u0430\u0440\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0443\u0442\u0438\u043d\u044b!<\/p>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/2.9\/plugins\/inventory.html\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.ansible.com\/ansible\/2.9\/plugins\/inventory.html<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/ansible\/ansible\/tree\/stable-2.9\/contrib\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ansible\/ansible\/tree\/stable-2.9\/contrib<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/ansible\/ansible\/blob\/stable-2.9\/lib\/ansible\/plugins\/inventory\/script.py\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ansible\/ansible\/blob\/stable-2.9\/lib\/ansible\/plugins\/inventory\/script.py<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/gist.github.com\/onegreyonewhite\/fc4de39b86a0bfa2cdf656ef57081600\" rel=\"noopener noreferrer nofollow\">https:\/\/gist.github.com\/onegreyonewhite\/fc4de39b86a0bfa2cdf656ef57081600<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/704518\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             91.67%           <\/span> <span class=\"tm-article-poll__answer-label\">Ansible<\/span> <span class=\"tm-article-poll__answer-votes\">             11           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:91.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">Chef<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">Puppet<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">Cfengine<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             16.67%           <\/span> <span class=\"tm-article-poll__answer-label\">*sh-\u0441\u043a\u0440\u0438\u043f\u0442\u044b<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:16.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0421\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 12 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.      <\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/704518\/\"> https:\/\/habr.com\/ru\/post\/704518\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0438 \u0447\u0430\u0449\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Ansible \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043e\u043a \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u0438 \u0433\u0440\u0430\u0431\u043b\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0433\u0440\u0435\u0441\u0442\u0438 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u0431\u0435\u0437 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u043d\u0438\u0431\u0443\u0442\u0430 \u0438\u043b\u0438 \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e \u043c\u043e\u0449\u043d\u0435\u0435. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u043d\u0437\u0438\u0431\u043b\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c inventory. \u041c\u043d\u0435 \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043b\u044e\u0434\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u044e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0430 \u0435\u0441\u043b\u0438 \u0438 \u0447\u0438\u0442\u0430\u044e\u0442, \u0442\u043e \u0443\u043c\u0443\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043d\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Ansible. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Python \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u0437\u044b\u043a.<\/p>\n<hr\/>\n<h2>\u0414\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445<\/h2>\n<p>\u0422\u0435, \u043a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u043a \u043a\u043e\u0434\u0443, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/gist.github.com\/onegreyonewhite\/fc4de39b86a0bfa2cdf656ef57081600\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <\/a>gist \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c):<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python  \"\"\" This is an example script for implementing dynamic inventory in Ansible. It could have been written in bash, but python is much easier to read. \"\"\"  import argparse import json  # Example hosts store store = {     \"postgres-1\": {         \"metadatafromstore\": {             \"ip\": ['172.16.1.1'],             'discs': ['\/dev\/vda', '\/dev\/sda'],             'users': ['grey'],             'mounts': {                 \"\/\": '\/dev\/vda',                 \"\/opt\/postgres\/data\": \"\/dev\/sda\",             },         }     },     \"apache\": {         \"metadatafromstore\": {             \"ip\": ['172.16.1.3'],             'discs': ['\/dev\/vda'],             'mounts': {                 \"\/\": '\/dev\/vda',             },         }     }, }   def get_host_vars(host):     data = {         'ansible_host': host,         'ansible_user': 'root',     }     if host in store:         metadata = store[host].get('metadatafromstore', {}) or {}         if metadata.get('ip'):             data['ansible_host'] = metadata['ip'][0]         if 'users' in metadata:             data['ansible_user'] = metadata['users'][0]         data.update(metadata)     return data   def get_vars(host, pretty=False):     \"\"\"     Function which return json data of host's variables.     \"\"\"     return json.dumps({}, indent=pretty)   def get_list(pretty=False):     \"\"\"     Function which return inventory data for hosts.     Example contains all variants of groups. Syntax as yaml inventory but with '_meta' section.      - 'hostvars' is all variables for hosts.     - 'all' is default group which should be always created.     - 'ungrouped' is testing group with hosts.     \"\"\"     hostvars, ungrouped = {}, []      for host in store:         ungrouped.append(host)         hostvars[host] = get_host_vars(host)      data = {         '_meta': {           'hostvars': hostvars         },         'all': {             'children': [                 'ungrouped'             ]         },         'ungrouped': {             'hosts': ungrouped         }     }     return json.dumps(data, indent=pretty)   # Parse arguments. # Ansible require two: '--list' and output of all data and '--host [hostname] for getting variables about one host' parser = argparse.ArgumentParser() parser.add_argument(     '--pretty',     action='store_true',     default=False,     help=\"Pretty print JSON\" ) parser.add_argument(     \"--list\",     action='store',  # also better use store_true     nargs=\"*\",     default=\"dummy\",     help=\"Show JSON of all managed hosts\" ) parser.add_argument(     \"--host\",     action='store',     help=\"Display vars related to the host\" ) args = parser.parse_args()  # Print output will be parsed via ansible as inventory (like a file). if args.host:     print(get_vars(args.host, args.pretty)) elif len(args.list) >= 0:     print(get_list(args.pretty)) else:     raise ValueError(\"Expecting either --host $HOSTNAME or --list\")<\/code><\/pre>\n<h2>\u0422\u0435\u043e\u0440\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0451\u043d\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u042f\u041f, \u043b\u0443\u0447\u0448\u0438\u043c \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043e\u0440\u0438\u0438.<\/p>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0435\u0432<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 cli \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 ansible, \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439 \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 ansible.cfg (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430, \u043d\u043e \u044d\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e). \u0412 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;:<\/p>\n<pre><code>[inventory] enable_plugins = host_list, script, auto, yaml, ini, toml<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443: \u0441\u043f\u0435\u0440\u0432\u0430 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0445\u043e\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e, \u043f\u043e\u0442\u043e\u043c \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u043f\u043e\u043a\u0430 %username% \u043d\u0435 \u043f\u043e\u0448\u0451\u043b \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0435\u043d\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041e\u043d \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0444\u0430\u0439\u043b, \u043f\u043e\u0442\u043e\u043c \u0447\u0438\u0442\u0430\u0435\u0442 \u0432 \u043d\u0451\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 plugin \u0438 \u0443\u0436\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043d\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u043c \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u043d\u0437\u0438\u0431\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d.<\/p>\n<\/div>\n<\/details>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u044c, \u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 yaml \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u0438\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u0442\u043e \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 (\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438\u043b\u0438 \u0444\u0430\u0439\u043b), \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041f\u0435\u0440\u0432\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0432\u0448\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0441\u0442\u043e\u044f\u0442 \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d script<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0439.<\/p>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u0424\u0430\u0439\u043b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <code>#!<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u043a\u043b\u0430\u0434\u0451\u0442\u0435 \u0431\u0438\u043d\u0430\u0440\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432\u0441\u0435\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c. \u041f\u0430\u0440\u0443 \u0440\u0430\u0437 \u043d\u0430\u0442\u044b\u043a\u0430\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0438\u043c\u0435\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--list<\/code>, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0438\u0437 \u043f\u0430\u0439\u043f\u0430, \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u043c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f. \u0417\u0430\u0442\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>--host \u0438\u043c\u044f_\u0445\u043e\u0441\u0442\u0430<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430. \u041d\u0430\u0441\u0447\u0451\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u0441\u0443\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u0430. \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h2>\u0420\u0430\u0437\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0434\u0442\u0438 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0442.\u0435. \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d, \u0447\u0442\u043e\u0431 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f).<\/p>\n<h4>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/h4>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0443. \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0437\u0430 Python, \u0442\u043e \u0442\u0443\u0442 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 &#171;\u0438\u0437 \u0431\u0430\u0442\u0430\u0440\u0435\u0435\u043a&#187; \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>argparse<\/code>. \u042f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u0438\u0431\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u041d\u043e \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u044b \u0434\u0432\u0435 \u0432\u0435\u0449\u0438.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 <code>--list<\/code> \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443. \u0412\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u041d\u0435 \u0440\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u044f \u0446\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e. \u041b\u0443\u0447\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>action=\"store_true\"<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0441 \u044d\u0442\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0422\u0430\u043a\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 (\u0432\u044b\u0432\u043e\u0434 \u0432 json):<\/p>\n<pre><code class=\"json\">{   \"_meta\": {     \"hostvars\": {} \/\/ \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 - \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - json object \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438   },   \"all\": {} \/\/ \u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0443 \u043d\u0430\u0441 \u0438\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0445\u043e\u0441\u0442\u043e\u0432. }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b, \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/inventory_guide\/intro_inventory.html#inventory-basics-formats-hosts-and-groups\" rel=\"noopener noreferrer nofollow\">yaml \u043f\u043b\u0430\u0433\u0438\u043d<\/a>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430. \u041d\u043e \u0432\u0441\u0451 \u0436\u0435 \u044f \u0443\u0442\u043e\u0447\u043d\u044e.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 json \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043a\u043b\u044e\u0447 &#8212; \u0438\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u044b, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u0434\u0430\u043d\u043d\u044b\u0435). \u041a\u0430\u0436\u0434\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0432 \u0441\u0435\u0431\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><code>vars<\/code> &#8212; \u043d\u0430\u0431\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430\u0431\u043e\u0440: \u043a\u043b\u044e\u0447 &#8212; \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><code>hosts<\/code> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a (\u0438\u043c\u0435\u043d\u043d\u043e list) \u0438\u043c\u0451\u043d \u0445\u043e\u0441\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435. \u041d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u041a\u0430\u0436\u0434\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u0445\u043e\u0441\u0442 \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><code>children<\/code> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0451\u043d \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c: \u043b\u0438\u0431\u043e \u0443 \u0432\u0430\u0441 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430, \u043b\u0438\u0431\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0445\u043e\u0441\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0451\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0442\u0430\u043a\u0436\u0435 \u0432 json \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043a\u043e\u0434\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0445\u0430\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u044d\u0442\u043e \u041d\u0415 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>hosts<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442: <code>{\"all\": [\"host1\", \"host2\"]}<\/code>, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0443\u043f\u043f\u0443 all \u0441 \u0445\u043e\u0441\u0442\u0430\u043c\u0438. \u042d\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c. \u0412 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u043e\u0442 \u0445\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u043e \u0433\u0440\u0443\u043f\u043f\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u043e\u0439 \u0441 \u0445\u043e\u0441\u0442\u043e\u043c, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0445\u043e\u0441\u0442\u0430. \u0412\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043e\u0434, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0443\u0442\u0430\u0435\u0442, \u0447\u0435\u043c \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044f\u0432\u043d\u044b\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0433\u0440\u0443\u043f\u043f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>_meta<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>hostvars<\/code>. \u042d\u0442\u043e \u043d\u0435 \u0433\u0440\u0443\u043f\u043f\u0430, \u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, <code>hostvars<\/code> \u0431\u0443\u0434\u0435\u0442 <code>None<\/code>, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445 \u0432 <code>_meta<\/code> \u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438\u043d\u0432\u0435\u043d\u0442\u043e\u0440\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0432 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-342510","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/342510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=342510"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/342510\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=342510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=342510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=342510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}