Use include/import tasks (#2192)

import_tasks will consume far less memory, so it should be
used whenever it is compatible.
This commit is contained in:
Matthew Mosesohn
2018-01-29 14:37:48 +03:00
committed by GitHub
parent f4180503c8
commit dc6a17e092
43 changed files with 117 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
---
- include: ../shared/create_mount.yml
- include_tasks: ../shared/create_mount.yml
vars:
create_mount_path: "{{ item.name }}"
create_mount_default_lease_ttl: "{{ item.default_lease_ttl }}"

View File

@@ -1,5 +1,5 @@
---
- include: ../shared/create_role.yml
- include_tasks: ../shared/create_role.yml
vars:
create_role_name: "{{ item.name }}"
create_role_group: "{{ item.group }}"

View File

@@ -1,32 +1,32 @@
---
- include: ../shared/check_vault.yml
- import_tasks: ../shared/check_vault.yml
when: inventory_hostname in groups.vault
- include: ../shared/check_etcd.yml
- import_tasks: ../shared/check_etcd.yml
when: inventory_hostname in groups.vault
- include: configure.yml
- import_tasks: configure.yml
when: inventory_hostname in groups.vault
- include: binary.yml
- import_tasks: binary.yml
when: inventory_hostname in groups.vault and vault_deployment_type == "host"
- include: systemd.yml
- import_tasks: systemd.yml
when: inventory_hostname in groups.vault
- include: init.yml
- import_tasks: init.yml
when: inventory_hostname in groups.vault
- include: unseal.yml
- import_tasks: unseal.yml
when: inventory_hostname in groups.vault
- include: ../shared/find_leader.yml
- import_tasks: ../shared/find_leader.yml
when: inventory_hostname in groups.vault
- include: create_mounts.yml
- import_tasks: create_mounts.yml
when: inventory_hostname == groups.vault|first
- include: ../shared/gen_ca.yml
- include_tasks: ../shared/gen_ca.yml
vars:
gen_ca_cert_dir: "{{ vault_pki_mounts.kube.cert_dir }}"
gen_ca_mount_path: "{{ vault_pki_mounts.kube.name }}"
@@ -34,14 +34,14 @@
gen_ca_vault_options: "{{ vault_ca_options.kube }}"
when: inventory_hostname in groups.vault
- include: ../shared/auth_backend.yml
- include_tasks: ../shared/auth_backend.yml
vars:
auth_backend_description: A Username/Password Auth Backend primarily used for services needing to issue certificates
auth_backend_path: userpass
auth_backend_type: userpass
when: inventory_hostname == groups.vault|first
- include: create_roles.yml
- include_tasks: create_roles.yml
with_items:
- "{{ vault_pki_mounts.vault }}"
- "{{ vault_pki_mounts.etcd }}"