Commit 7d56ebc7 authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

Prettify

parent 715820be
......@@ -5,7 +5,9 @@
requirements: "requirements/login-radius.txt"
virtualenv: "{{noc_root}}"
extra_args: "--trusted-host cdn.getnoc.com --find-links https://cdn.getnoc.com/npkg/simple/ --allow-all-external --upgrade"
when: "login_methods is defined and 'radius' in login_methods"
when:
- login_methods is defined
- "'radius' in login_methods"
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......@@ -20,7 +22,9 @@
requirements: "requirements/login-ldap.txt"
virtualenv: "{{noc_root}}"
extra_args: "--trusted-host cdn.getnoc.com --find-links https://cdn.getnoc.com/npkg/simple/ --allow-all-external --upgrade"
when: "login_methods is defined and 'ldap' in login_methods"
when:
- login_methods is defined
- "'ldap' in login_methods"
environment:
https_proxy: "{{http_proxy}}"
http_proxy: "{{http_proxy}}"
......
......@@ -11,21 +11,27 @@
dest: "{{noc_root}}/etc/noc_services.conf"
owner: "{{noc_user}}"
mode: "0640"
when: "noc_services is defined and noc_services"
when:
- noc_services is defined
- noc_services
- name: Generate NOC config
template:
src: "etc/tower.yml.j2"
dest: "{{ noc_etc }}/tower.yml"
no_log: "{{tower_show_secrets}}"
when: "noc_services is defined and noc_services"
when:
- noc_services is defined
- noc_services
- name: Generate NOC config for pooled services
template:
src: "etc/pooled.yml.j2"
dest: "{{ noc_etc }}/pool-{{item.name}}.yml"
no_log: "{{tower_show_secrets}}"
when: "noc_services is defined and noc_services"
when:
- noc_services is defined
- noc_services
vars:
pool_name: "{{item.name}}"
with_items:
......
......@@ -11,6 +11,8 @@
- name: Set tower_ip on local connection
set_fact:
tower_ip: "{{ansible_default_ipv4.address}}"
when: "'smart' not in ansible_connection and 'ssh' not in ansible_connection"
when:
- "'smart' not in ansible_connection"
- "'ssh' not in ansible_connection"
tags:
- always
......@@ -5,7 +5,9 @@
regexp: "^proxy=.*"
line: "proxy={{ http_proxy }}"
become: "True"
when: "http_proxy is defined and http_proxy"
when:
- http_proxy is defined
- http_proxy
tags:
- config
......
......@@ -4,7 +4,9 @@
dest: /etc/yum.conf
regexp: "^proxy=.*"
line: "proxy={{ http_proxy }}"
when: "http_proxy is defined and http_proxy"
when:
- http_proxy is defined
- http_proxy
become: "True"
tags:
- config
......
......@@ -57,6 +57,8 @@
- name: Expose consul_bind_address as fact
set_fact:
consul_bind_address: "{{ansible_host}}"
when: consul_address is defined and consul_address!='node_ip'
when:
- consul_address is defined
- consul_address!='node_ip'
tags:
- config
......@@ -28,6 +28,8 @@
- name: Expose consul_bind_address as fact
set_fact:
consul_bind_address: "{{ansible_host}}"
when: consul_address is defined and consul_address!='node_ip'
when:
- consul_address is defined
- consul_address!='node_ip'
tags:
- config
......@@ -20,6 +20,8 @@
- name: Expose consul_bind_address as fact
set_fact:
consul_bind_address: "{{ansible_host}}"
when: consul_address is defined and consul_address!='node_ip'
when:
- consul_address is defined
- consul_address!='node_ip'
tags:
- config
......@@ -55,6 +55,8 @@
- name: Expose consul_bind_address as fact
set_fact:
consul_bind_address: "{{ansible_host}}"
when: consul_address is defined and consul_address!='node_ip'
when:
- consul_address is defined
- consul_address!='node_ip'
tags:
- config
......@@ -28,6 +28,8 @@
- name: Expose consul_bind_address as fact
set_fact:
consul_bind_address: "{{ansible_host}}"
when: consul_address is defined and consul_address!='node_ip'
when:
- consul_address is defined
- consul_address!='node_ip'
tags:
- config
---
#- name: Install Grafana simple datasource plugin
# grafana_plugin:
# name: "{{item}}"
# version: latest
# state: present
# grafana_plugins_dir: "{{grafana_plugins_dir}}"
# with_items:
# - grafana-simple-json-datasource
# - vertamedia-clickhouse-datasource
# notify: restart grafana
# environment:
# https_proxy: "{{http_proxy}}"
# tags:
# - requirements
- name: Install Grafana simple datasource plugin
command: "grafana-cli plugins install grafana-simple-json-datasource"
args:
......
......@@ -51,7 +51,9 @@
template:
src: "etc/logrotate.d/mongod.conf.j2"
dest: "/etc/logrotate.d/mongod.conf"
when: "'Linux' in ansible_system and 'file' in mongod_logging_destination"
when:
- "'Linux' in ansible_system"
- "'file' in mongod_logging_destination"
tags:
- config
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment