tasks:
- name: Print dashboard URL
debug:
- msg: "All done! You may access your dashboard at http://{{ groups['ceph-grafana'][0] }}:3000/ with your pre-defined user and password (admin/admin by default). Note that initially the dashboard will be incomplete; after a few minutes it should have enough data collected to function properly."
+ msg: "All done! You may access your dashboard at http://{{ groups['ceph-grafana'][0] }}:3000/ with your pre-defined user and password (admin/admin by default). Note that initially the dashboard will be incomplete; after a few minutes it should have enough data collected to function properly." # noqa 204
dest: "{{ collectd_conf_d }}/cephmetrics.conf"
regexp: 'EventURL ".*"'
insertafter: 'ClusterName ".*"'
- line: " EventURL \"http://{{ groups['ceph-grafana'][0] }}:{{ graphite.web_port if graphite.service == 'graphite-web' else graphite.api_port }}/events/\""
+ line: " EventURL \"http://{{ groups['ceph-grafana'][0] }}:{{ graphite.web_port if graphite.service == 'graphite-web' else graphite.api_port }}/events/\"" # noqa 204
notify: Restart collectd
- name: Set ModulePath in cephmetrics.conf
# ... and so on
- name: Set dashboards var keys
set_fact:
- dashboards: "{% for item in dashboard_files.results %}{{ dashboards.update({item.stat.path.split('/')[-1].split('.')[:-1]|join('.'): {'body': lookup('file', item.stat.path)|from_json }}) }}{% endfor %}{{ dashboards }}"
+ dashboards: "{% for item in dashboard_files.results %}{{ dashboards.update({item.stat.path.split('/')[-1].split('.')[:-1]|join('.'): {'body': lookup('file', item.stat.path)|from_json }}) }}{% endfor %}{{ dashboards }}" # noqa 204
no_log: true
# If the dashboards have been previously deployed, we need the ID so that we
---
- name: Resize whisper databases
# xargs -P parallelizes execution; scale it to the number of cores on the system
- shell: "find /var/lib/carbon/whisper -name '*.wsp' -print0 | xargs -n1 -0 -P {{ ansible_processor_vcpus }} -I {} whisper-resize {} {{ whisper_retention.replace(',', ' ') }}"
+ shell: "find /var/lib/carbon/whisper -name '*.wsp' -print0 | xargs -n1 -0 -P {{ ansible_processor_vcpus }} -I {} whisper-resize {} {{ whisper_retention.replace(',', ' ') }}" # noqa 204
register: whisper_resize
failed_when: "'Traceback' in whisper_resize.stdout"
no_log: true
---
- name: Combine default settings and user-defined variables
- set_fact: {"{{ item }}": "{% if vars[item] is not defined %}{{ defaults[item] }}{% elif vars[item] is mapping %}{{ defaults[item]|combine(vars[item]|default({})) }}{% else %}{{ vars[item] }}{% endif %}"}
+ set_fact: {"{{ item }}": "{% if vars[item] is not defined %}{{ defaults[item] }}{% elif vars[item] is mapping %}{{ defaults[item]|combine(vars[item]|default({})) }}{% else %}{{ vars[item] }}{% endif %}"} # noqa 204
with_items: "{{ defaults.keys() }}"
no_log: true