kolla-ansible/ansible/roles/mariadb/tasks/lookup_cluster.yml
Raimund Hook 84ea42bd7c Updating Jinja filters to conform to Ansible 2.5+
Since Ansible 2.5, the use of jinja tests as filters has been
deprecated.

I've run the script provided by the ansible team to 'fix' the
jinja filters to conform to the newer syntax.

This fixes the deprecation warnings.

Change-Id: I844ecb7bec94e561afb09580f58b1bf83a6d00bd
Closes-bug: #1827370
2019-05-02 14:58:09 +01:00

37 lines
1.1 KiB
YAML

---
- name: Cleaning up temp file on localhost
local_action: file path=/tmp/kolla_mariadb_cluster state=absent
changed_when: False
check_mode: no
run_once: True
- name: Creating temp file on localhost
local_action: copy content='' dest=/tmp/kolla_mariadb_cluster mode=0644
changed_when: False
check_mode: no
run_once: True
- name: Creating mariadb volume
become: true
kolla_docker:
action: "create_volume"
common_options: "{{ docker_common_options }}"
name: "mariadb"
register: mariadb_volume
- name: Writing hostname of host with existing cluster files to temp file
local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_mariadb_cluster mode=0644
changed_when: False
check_mode: no
when: mariadb_volume is not changed
- name: Registering host from temp file
set_fact:
has_cluster: "{{ lookup('file', '/tmp/kolla_mariadb_cluster') | length > 0 }}"
- name: Cleaning up temp file on localhost
local_action: file path=/tmp/kolla_mariadb_cluster state=absent
changed_when: False
check_mode: no
run_once: True