Remove usage of "include" in favor of include_tasks and import_tasks
"include" was deprecated and we shouldn't use it anymore.
This commit is contained in:
parent
0b4ad4c94c
commit
e30e6c05ce
|
@ -105,7 +105,7 @@
|
|||
notify:
|
||||
- Restart ipsec
|
||||
|
||||
- include: resource-agent.yml
|
||||
- include_tasks: resource-agent.yml
|
||||
when:
|
||||
- pacemaker_running
|
||||
- type != 'opportunistic'
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
register: resource_agent
|
||||
when: pacemaker_running
|
||||
|
||||
- include: ipsec-conf.yml
|
||||
- include_tasks: ipsec-conf.yml
|
||||
with_items: "{{ private_networks }}"
|
||||
vars:
|
||||
policy: private
|
||||
|
@ -56,7 +56,7 @@
|
|||
# Unfortunately the ctlplane currently has issues when non-opportunistic
|
||||
# tunnels are used. It will reject any connection and hold packets for
|
||||
# some reason.
|
||||
- include: ipsec-conf.yml
|
||||
- include_tasks: ipsec-conf.yml
|
||||
with_items: "{{ private_or_clear_networks }}"
|
||||
vars:
|
||||
policy: private-or-clear
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# ip: <Actual VIP>
|
||||
# - name: <Another name of the VIP for this network>
|
||||
# ip: <Another actual VIP>
|
||||
- include: hardcoded-network-discover.yml
|
||||
- import_tasks: hardcoded-network-discover.yml
|
||||
|
||||
- name: Get pacemaker status
|
||||
systemd:
|
||||
|
@ -45,7 +45,7 @@
|
|||
notify:
|
||||
- Restart ipsec
|
||||
|
||||
- include: legacy-ipsec-conf.yml
|
||||
- include_tasks: legacy-ipsec-conf.yml
|
||||
with_items: "{{ networks }}"
|
||||
|
||||
# Permissions gotten from http://www.linux-ha.org/doc/dev-guides/_installing_and_packaging_resource_agents.html
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
# This queries the VIPs for all networks and flattens them into a list
|
||||
# that contains a dict with the "name" and "ip" for each VIP entry.
|
||||
- include: resource-agent.yml
|
||||
- include_tasks: resource-agent.yml
|
||||
loop_control:
|
||||
loop_var: current_vip
|
||||
with_items: "{{ networks|default([])|json_query('[*].vips[]')|list }}"
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
---
|
||||
- when: ipsec_uninstall_tunnels|bool or ipsec_upgrade_tunnels|bool
|
||||
block:
|
||||
- include: uninstall.yml
|
||||
- import_tasks: uninstall.yml
|
||||
|
||||
- when: not ipsec_uninstall_tunnels|bool or ipsec_upgrade_tunnels|bool
|
||||
block:
|
||||
- include: setup.yml
|
||||
- import_tasks: setup.yml
|
||||
|
||||
- include: firewall.yml
|
||||
- import_tasks: firewall.yml
|
||||
when: not ipsec_skip_firewall_rules|bool
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
# This doesn't use the dynamic inventory
|
||||
- include: legacy.yml
|
||||
- import_tasks: legacy.yml
|
||||
when: enabled_networks is not defined or ipsec_force_install_legacy|bool
|
||||
|
||||
# This uses the dynamic inventory
|
||||
- include: ipsec.yml
|
||||
- import_tasks: ipsec.yml
|
||||
when: enabled_networks is defined and not ipsec_force_install_legacy|bool
|
||||
|
|
Loading…
Reference in New Issue