f5networks.f5_modules.license_hopper 查询 – 从列表中返回随机许可证
注意
此查找插件是 f5networks.f5_modules 集合 (版本 1.32.1) 的一部分。
如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install f5networks.f5_modules。
要在剧本中使用它,请指定:f5networks.f5_modules.license_hopper。
f5networks.f5_modules 1.0.0 中的新增功能
概要
- 从文件中选择一个随机许可证密钥,并将其从将来的查找中移除。 
- 如果指定了 - remove=True,则可以选择移除密钥。
示例
- name: Get a regkey license from a stash without deleting it
  bigiq_regkey_license:
    key: "{{ lookup('license_hopper', 'filename=/path/to/licenses.txt') }}"
    state: present
    pool: regkey1
- name: Get a regkey license from a stash and delete the key from the file
  bigiq_regkey_license:
    key: "{{ lookup('license_hopper', 'filename=/path/to/licenses.txt', remove=True) }}"
    state: present
    pool: regkey1
返回值
| 键 | 描述 | 
|---|---|
| 随机项 返回:成功 | 
