Ansible lint related fixes

Change-Id: I146ea3d84efb83ec5d7405644ad372e57ecafc1e
This commit is contained in:
Michal Nasiadka 2020-04-20 10:00:51 +02:00 committed by Radosław Piliszek
parent 8618cfac2f
commit 2128075c6e
6 changed files with 17 additions and 6 deletions

View File

@ -3,7 +3,8 @@
hosts: localhost
become: true
tasks:
- template:
- name: Template out admin-openrc.sh
template:
src: "roles/common/templates/admin-openrc.sh.j2"
dest: "{{ node_config }}/admin-openrc.sh"
run_once: True

View File

@ -80,7 +80,7 @@
"index": ".kibana-6"
},
"script": {
"inline": "ctx._source = [ ctx._type : ctx._source ]; ctx._source.type = ctx._type; ctx._id = ctx._type + \":\" + ctx._id; ctx._type = \"doc\"; ",
"inline": "ctx._source = [ ctx._type : ctx._source ]; ctx._source.type = ctx._type; ctx._id = ctx._type + \":\" + ctx._id; ctx._type = \"doc\"; ", # noqa 204
"lang": "painless"
}
}

View File

@ -77,7 +77,7 @@
kolla_toolbox:
module_name: uri
module_args:
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/.kibana/index-pattern/{{ kibana_default_index_pattern }}"
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/.kibana/index-pattern/{{ kibana_default_index_pattern }}" # noqa 204
method: PUT
body: "{{ kibana_default_index | to_json }}"
body_format: json

View File

@ -47,7 +47,9 @@
- name: Mount cephfs
become: true
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mount -t ceph {{ cephfs_addr }} /tmp/cephfs -o name=manila,secret={{ manila_keyring.stdout }}"
command: >
docker exec -u 0 {{ manila_services['manila-share']['container_name'] }}
mount -t ceph {{ cephfs_addr }} /tmp/cephfs -o name=manila,secret={{ manila_keyring.stdout }}
register: mount_cephfs
changed_when: False
run_once: True

View File

@ -5,7 +5,13 @@
vars:
modules:
- {'name': ip6_tables}
when: neutron_services | select_services_enabled_and_mapped_to_host | list | intersect([ "neutron-l3-agent", "neutron-linuxbridge-agent", "neutron-openvswitch-agent" ]) | list | length > 0
when: >-
neutron_services |
select_services_enabled_and_mapped_to_host |
list |
intersect([ "neutron-l3-agent", "neutron-linuxbridge-agent", "neutron-openvswitch-agent" ]) |
list |
length > 0
- name: Setting sysctl values
become: true

View File

@ -13,6 +13,8 @@
vars:
ansible_version_host: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
fail:
msg: "Ansible version should be between {{ ansible_version_min }} and {{ ansible_version_max }}. Current version is {{ ansible_version.full }} which is not supported."
msg: >-
Ansible version should be between {{ ansible_version_min }} and {{ ansible_version_max }}.
Current version is {{ ansible_version.full }} which is not supported.
run_once: true
when: ansible_version_host is version(ansible_version_min, '<') or ansible_version_host is version(ansible_version_max, '>')