mirror of https://github.com/ceph/ceph-ansible.git
lint: fix error [303,602,701,702]
[303] mktemp used in place of tempfile module
[602] Don't compare to empty string
[701] No 'galaxy_info' found
[702] Use 'galaxy_tags' rather than 'categories'
This patch also changes the ansible log_path value via the
ANSIBLE_LOG_PATH environment variable in the travis configuration to
avoid warnings.
[WARNING]: log file at /home/travis/ansible/ansible.log is not writeable
and we cannot create it, aborting
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit f7fd0b6d4f
)
pull/4649/head
parent
4bf8cbe0c8
commit
6d5125f2a4
|
@ -10,4 +10,4 @@ install:
|
||||||
script:
|
script:
|
||||||
- if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
|
- if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
|
||||||
- pytest -vvvv library/ plugins/
|
- pytest -vvvv library/ plugins/
|
||||||
- for i in $(ls -1 roles/); do ansible-lint -x 204 -v roles/$i/ ; done
|
- for i in $(ls -1 roles/); do ANSIBLE_LOG_PATH=/dev/null ansible-lint -x 204 -v roles/$i/ ; done
|
||||||
|
|
|
@ -6,20 +6,20 @@
|
||||||
when: use_installer | bool
|
when: use_installer | bool
|
||||||
|
|
||||||
- name: use mktemp to create name for rundep
|
- name: use mktemp to create name for rundep
|
||||||
command: "mktemp /tmp/rundep.XXXXXXXX"
|
tempfile:
|
||||||
|
path: /tmp
|
||||||
|
prefix: rundep.
|
||||||
register: rundep_location
|
register: rundep_location
|
||||||
when: use_installer | bool
|
when: use_installer | bool
|
||||||
|
|
||||||
- name: copy rundep
|
- name: copy rundep
|
||||||
copy:
|
copy:
|
||||||
src: "{{ ansible_dir }}/rundep"
|
src: "{{ ansible_dir }}/rundep"
|
||||||
dest: "{{ item }}"
|
dest: "{{ rundep_location.path }}"
|
||||||
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
|
||||||
when: use_installer | bool
|
when: use_installer | bool
|
||||||
|
|
||||||
- name: install ceph dependencies
|
- name: install ceph dependencies
|
||||||
script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
|
script: "{{ ansible_dir }}/rundep_installer.sh {{ rundep_location.path }}"
|
||||||
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
|
||||||
when: use_installer | bool
|
when: use_installer | bool
|
||||||
|
|
||||||
- name: ensure rsync is installed
|
- name: ensure rsync is installed
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: dashboard_rgw_api_admin_resource != ''
|
when: dashboard_rgw_api_admin_resource | length > 0
|
||||||
|
|
||||||
- name: disable ssl verification for rgw
|
- name: disable ssl verification for rgw
|
||||||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-ssl-verify False"
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-rgw-api-ssl-verify False"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
{{ item.pgp_num | default(item.pg_num) | default(osd_pool_default_pg_num) }}
|
{{ item.pgp_num | default(item.pg_num) | default(osd_pool_default_pg_num) }}
|
||||||
{{ 'replicated_rule' if not item.rule_name | default('replicated_rule') else item.rule_name | default('replicated_rule') }}
|
{{ 'replicated_rule' if not item.rule_name | default('replicated_rule') else item.rule_name | default('replicated_rule') }}
|
||||||
{{ 1 if item.type|default(1) == 'replicated' else 3 if item.type|default(1) == 'erasure' else item.type|default(1) }}
|
{{ 1 if item.type|default(1) == 'replicated' else 3 if item.type|default(1) == 'erasure' else item.type|default(1) }}
|
||||||
{%- if (item.type | default("1") == '3' or item.type | default("1") == 'erasure') and item.erasure_profile != '' %}
|
{%- if (item.type | default("1") == '3' or item.type | default("1") == 'erasure') and item.erasure_profile | length > 0 %}
|
||||||
{{ item.erasure_profile }}
|
{{ item.erasure_profile }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{{ item.expected_num_objects | default('') }}
|
{{ item.expected_num_objects | default('') }}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
register: ceph_health_raw
|
register: ceph_health_raw
|
||||||
run_once: true
|
run_once: true
|
||||||
until: >
|
until: >
|
||||||
(ceph_health_raw.stdout != "") and (ceph_health_raw.stdout | default('{}') | from_json)['state'] in ['leader', 'peon']
|
(ceph_health_raw.stdout | length > 0) and (ceph_health_raw.stdout | default('{}') | from_json)['state'] in ['leader', 'peon']
|
||||||
retries: "{{ handler_health_mon_check_retries }}"
|
retries: "{{ handler_health_mon_check_retries }}"
|
||||||
delay: "{{ handler_health_mon_check_delay }}"
|
delay: "{{ handler_health_mon_check_delay }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
when:
|
when:
|
||||||
- containerized_deployment | bool
|
- containerized_deployment | bool
|
||||||
- ceph_osd_numactl_opts != ""
|
- ceph_osd_numactl_opts | length > 0
|
||||||
tags: with_pkg
|
tags: with_pkg
|
||||||
|
|
||||||
- name: install lvm2
|
- name: install lvm2
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
---
|
---
|
||||||
dependencies:
|
galaxy_info:
|
||||||
- role: ceph-defaults
|
company: Red Hat
|
||||||
|
author: Boris Ranto
|
||||||
|
description: Configures Prometheus for Ceph Dashboard
|
||||||
|
license: Apache
|
||||||
|
min_ansible_version: 2.4
|
||||||
|
platforms:
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
galaxy_tags:
|
||||||
|
- system
|
||||||
|
dependencies: []
|
||||||
|
|
|
@ -8,6 +8,6 @@ galaxy_info:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 7
|
||||||
categories:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
Loading…
Reference in New Issue