通过ansible字典列表解析

时间:2019-05-31 14:55:41

标签: ansible ansible-2.x ansible-facts ansible-template

ok: [localhost] => {
    "changed": false,
    "connection": "close",
    "content_type": "application/json",

    "json": {
          "items": [
             {
               "name": "enable_config_alerts",
                "sensitive": false,
                "value": "true"
              },
              {
                 "name": "heap_dump_directory_free_space_absolute_thresholds",
                 "sensitive": false,
                 "value": "{\"warning\":3221225472,\"critical\":2147483648}"
               },
               {
                 "name": "log_directory_free_space_absolute_thresholds",
                 "sensitive": false,
                 "value": "{\"warning\":3221225472,\"critical\":2147483648}"
                }
              ]
 },

我尝试过

        I tried to use with_sublelements and dictionary but failed

我想检查一个特定的名称是否匹配,然后将其值存储在寄存器值中

0 个答案:

没有答案