小编luc*_*mon的帖子

包含多个 import_playbook 文件中的变量

这是使用 Ansible 2.7 时出现的错误

我正在尝试将其中包含变量的文件包含到我的具有多个 import_playbook 的剧本中。

我有3个文件。

  1. 与所有变量合一
  2. 一个有剧本和任务的人
  3. 带有 import_playbook 的一个

我的剧本:

---
- name: Create CPG
  hosts: localhost

  tasks:
   - name: Create CPG "{{ cpg_name }}"
     hpe3par_cpg:
      storage_system_ip: "{{ storage_system_ip }}"
      storage_system_username: "{{ storage_system_username }}"
      storage_system_password: "{{ storage_system_password }}"
      state: present
      cpg_name: "{{ cpg_name }}"
      #domain: "{{ domain }}"
      growth_increment: "{{ growth_increment }}"
      growth_increment_unit: "{{ growth_increment_unit }}"
      growth_limit: "{{ growth_limit }}"
      growth_limit_unit: "{{ growth_limit_unit }}"
      growth_warning: "{{ growth_warning }}"
      growth_warning_unit: "{{ growth_warning_unit }}"
      raid_type: "{{ raid_type }}" …
Run Code Online (Sandbox Code Playgroud)

yaml ansible

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

ansible ×1

yaml ×1