Fix ansible-lint issues
Change-Id: I47859324efb82f80a64eaa2eeb4ade32cc7b6479
This commit is contained in:
parent
8b37e93e53
commit
66d5ef042a
|
@ -74,28 +74,28 @@
|
|||
set_fact:
|
||||
networks:
|
||||
- name: internalapi
|
||||
current_ip: "{{current_internalapi_ip_register.stdout}}"
|
||||
controllers: "{{internalapi_controllers_register.stdout_lines}}"
|
||||
current_ip: "{{ current_internalapi_ip_register.stdout }}"
|
||||
controllers: "{{ internalapi_controllers_register.stdout_lines }}"
|
||||
vips:
|
||||
- name: internalapi
|
||||
ip: "{{internalapi_vip_register.stdout}}"
|
||||
ip: "{{ internalapi_vip_register.stdout }}"
|
||||
- name: redis
|
||||
ip: "{{redis_vip_register.stdout}}"
|
||||
ip: "{{ redis_vip_register.stdout }}"
|
||||
- name: storage
|
||||
current_ip: "{{current_storage_ip_register.stdout}}"
|
||||
controllers: "{{storage_controllers_register.stdout_lines}}"
|
||||
current_ip: "{{ current_storage_ip_register.stdout }}"
|
||||
controllers: "{{ storage_controllers_register.stdout_lines }}"
|
||||
vips:
|
||||
- name: storage
|
||||
ip: "{{storage_vip_register.stdout}}"
|
||||
ip: "{{ storage_vip_register.stdout }}"
|
||||
- name: storagemgmt
|
||||
current_ip: "{{current_storagemgmt_ip_register.stdout}}"
|
||||
controllers: "{{storagemgmt_controllers_register.stdout_lines}}"
|
||||
current_ip: "{{ current_storagemgmt_ip_register.stdout }}"
|
||||
controllers: "{{ storagemgmt_controllers_register.stdout_lines }}"
|
||||
vips:
|
||||
- name: storagemgmt
|
||||
ip: "{{storagemgmt_vip_register.stdout}}"
|
||||
ip: "{{ storagemgmt_vip_register.stdout }}"
|
||||
- name: ctlplane
|
||||
current_ip: "{{current_ctlplane_ip_register.stdout}}"
|
||||
current_ip: "{{ current_ctlplane_ip_register.stdout }}"
|
||||
controllers: []
|
||||
vips:
|
||||
- name: ctlplane
|
||||
ip: "{{ctlplane_vip_register.stdout}}"
|
||||
ip: "{{ ctlplane_vip_register.stdout }}"
|
||||
|
|
|
@ -43,5 +43,5 @@
|
|||
|
||||
- name: Ping {{ current_vip.name }} VIP
|
||||
command: "ping -c 5 {{ current_vip.ip }}"
|
||||
when: current_vip.ip != '' and ipsec_configure_vips|bool
|
||||
when: current_vip.ip and ipsec_configure_vips|bool
|
||||
ignore_errors: true
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
name: "{{ network }}"
|
||||
ip: "{{ hostvars[inventory_hostname][vip_var_key]|default('') }}"
|
||||
|
||||
- name: Remove {{ network}} from virtual-private setting in ipsec setup configuration
|
||||
- name: Remove {{ network }} from virtual-private setting in ipsec setup configuration
|
||||
replace:
|
||||
path: /etc/ipsec.conf
|
||||
regexp: '(^\s+.*)%v4:{{ current_subnet|regex_replace("\.", "\.") }},(.*)$'
|
||||
|
@ -90,7 +90,7 @@
|
|||
src: ipsec-vip-tunnels.secrets.j2
|
||||
dest: /etc/ipsec.d/overcloud-{{ current_vip.name }}-vip-tunnels.secrets
|
||||
mode: '0600'
|
||||
when: current_vip.ip != '' and type != 'opportunistic' and ipsec_configure_vips|bool
|
||||
when: current_vip.ip and type != 'opportunistic' and ipsec_configure_vips|bool
|
||||
notify:
|
||||
- Listen for IPSEC connections
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
|||
src: ipsec-vip-tunnels.conf.j2
|
||||
dest: /etc/ipsec.d/overcloud-{{ current_vip.name }}-vip-tunnels.conf
|
||||
mode: '0640'
|
||||
when: current_vip.ip != '' and type != 'opportunistic' and ipsec_configure_vips|bool
|
||||
when: current_vip.ip and type != 'opportunistic' and ipsec_configure_vips|bool
|
||||
notify:
|
||||
- Listen for IPSEC connections
|
||||
|
||||
|
@ -107,7 +107,7 @@
|
|||
when:
|
||||
- pacemaker_running|bool
|
||||
- type != 'opportunistic'
|
||||
- current_vip.ip != ''
|
||||
- current_vip.ip
|
||||
- inventory_hostname == groups['pacemaker'][0]
|
||||
- ipsec_setup_resource_agents|bool
|
||||
- ipsec_configure_vips|bool
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
controllers: "{{ item.controllers }}"
|
||||
vips: "{{ item.vips }}"
|
||||
|
||||
- name: Add legacy {{network }} tunnel configuration if not in skip list
|
||||
- name: Add legacy {{ network }} tunnel configuration if not in skip list
|
||||
when: network not in ipsec_skip_networks
|
||||
block:
|
||||
- name: Write node-to-node ipsec secrets file for the {{ network }} network
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
- found_resource_agent|succeeded
|
||||
|
||||
- name: Add {{ resource_agent_name }} pacemaker resource agent
|
||||
command: pcs resource create {{ resource_agent_name }} ocf:heartbeat:ipsec tunnel={{ specific_tunnel }} vip={{ specific_vip }} fallbacktunnel={{ fallback_tunnel }} --disabled
|
||||
command: pcs resource create {{ resource_agent_name }} ocf:heartbeat:ipsec tunnel={{ specific_tunnel }} vip={{ specific_vip }}
|
||||
fallbacktunnel={{ fallback_tunnel }} --disabled
|
||||
when:
|
||||
- resource_agent.changed or found_resource_agent|failed
|
||||
|
||||
|
|
Loading…
Reference in New Issue