community.general.cloud_init_data_facts – Получение данных фактов cloud-init.
Примечание
Этот плагин входит в коллекцию community.general (версия 2.0.1).
Для его установки используйте: ansible-galaxy collection install community.general.
Для использования в книге задач укажите: community.general.cloud_init_data_facts.
Обзор
- Собирает данные фактов, считывая status.json и result.json файлов cloud-init.
Параметры
| Параметр | Варианты/Значения по умолчанию | Комментарии |
|---|---|---|
| filter строка |
| Фильтр данных фактов |
Примечания
Примечание
- См. http://cloudinit.readthedocs.io/ для получения дополнительной информации о cloud-init.
Примеры
- name: Gather all facts of cloud init
community.general.cloud_init_data_facts:
register: result
- ansible.builtin.debug:
var: result
- name: Wait for cloud init to finish
community.general.cloud_init_data_facts:
filter: status
register: res
until: "res.cloud_init_data_facts.status.v1.stage is defined and not res.cloud_init_data_facts.status.v1.stage"
retries: 50
delay: 5
Возвращаемые значения
Общие возвращаемые значения описаны здесь, следующие являются полями, уникальными для данного модуля:
| Ключ | Возвращаемое значение | Описание |
|---|---|---|
| cloud_init_data_facts словарь | успех | Данные фактов result и status. Пример: { "status": { "v1": { "datasource": "DataSourceCloudStack", "errors": [] }, "result": { "v1": { "datasource": "DataSourceCloudStack", "init": { "errors": [], "finished": 1522066377.0185432, "start": 1522066375.2648022 }, "init-local": { "errors": [], "finished": 1522066373.70919, "start": 1522066373.4726632 }, "modules-config": { "errors": [], "finished": 1522066380.9097016, "start": 1522066379.0011985 }, "modules-final": { "errors": [], "finished": 1522066383.56594, "start": 1522066382.3449218 }, "stage": null } } |
Авторы
- René Moser (@resmo)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/cloud_init_data_facts_module.html