re-enabling ansible-lint rules 102 and 601
Change-Id: Ib4c31055f3243b168d943948a6ec3e6c2739f93f
This commit is contained in:
parent
86bfc78e25
commit
6afbfc7c3f
@ -1,13 +1,11 @@
|
||||
---
|
||||
parseable: true
|
||||
skip_list:
|
||||
- '102' # [E102] No Jinja2 in when
|
||||
- '204' # [E204] Lines should be no longer than 120 chars
|
||||
- '206' # [E206] Variables should have spaces before and after: {{ var_name }}
|
||||
- '405'
|
||||
- '503' # [E503] Tasks that run when changed should likely be handlers
|
||||
- '504'
|
||||
- '601' # [E601] Don't compare to literal True/False
|
||||
- '602' # [E602] Don't compare to empty string
|
||||
- ANSIBLE0006
|
||||
- ANSIBLE0007
|
||||
|
@ -12,7 +12,7 @@
|
||||
group: ceilometer
|
||||
mode: 0640
|
||||
backup: true
|
||||
when: "{{reduced_metrics}} == false and ('Newton' in osp_version['content'] | b64decode)"
|
||||
when: "not reduced_metrics and ('Newton' in osp_version['content'] | b64decode)"
|
||||
|
||||
- name: (Newton) Deploy the reduced metrics pipeline.yaml file
|
||||
become: true
|
||||
@ -23,7 +23,7 @@
|
||||
group: ceilometer
|
||||
mode: 0640
|
||||
backup: true
|
||||
when: "{{reduced_metrics}} == true and ('Newton' in osp_version['content'] | b64decode)"
|
||||
when: "reduced_metrics and ('Newton' in osp_version['content'] | b64decode)"
|
||||
|
||||
- name: (Ocata) Deploy polling.yaml file
|
||||
become: true
|
||||
@ -34,7 +34,7 @@
|
||||
group: ceilometer
|
||||
mode: 0640
|
||||
backup: true
|
||||
when: "{{reduced_metrics}} == false and ('Ocata' in osp_version['content'] | b64decode)"
|
||||
when: "not reduced_metrics and ('Ocata' in osp_version['content'] | b64decode)"
|
||||
|
||||
- name: (Ocata) Deploy the reduced metrics polling.yaml file
|
||||
become: true
|
||||
@ -45,7 +45,7 @@
|
||||
group: ceilometer
|
||||
mode: 0640
|
||||
backup: true
|
||||
when: "{{reduced_metrics}} == true and ('Ocata' in osp_version['content'] | b64decode or 'Pike')"
|
||||
when: "reduced_metrics and ('Ocata' in osp_version['content'] | b64decode or 'Pike')"
|
||||
|
||||
- name: (Containerized Pike) Deploy the polling.yaml
|
||||
become: true
|
||||
|
@ -11,25 +11,25 @@
|
||||
- name: stop keystone service
|
||||
become: true
|
||||
service: name=openstack-keystone state=stopped
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
|
||||
- name: restart httpd service
|
||||
become: true
|
||||
service: name=httpd state=restarted
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
|
||||
- name: restart keystone service
|
||||
become: true
|
||||
service: name=openstack-keystone state=restarted
|
||||
when: "'eventlet' in '{{ keystone_deployment }}'"
|
||||
when: "'eventlet' in keystone_deployment"
|
||||
|
||||
- name: pacemaker default managed
|
||||
become: true
|
||||
command: pcs property set is-managed-default=true
|
||||
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
|
||||
when: "'eventlet' in keystone_deployment and pacemaker_controlled"
|
||||
|
||||
- name: pacemaker cleanup keystone
|
||||
become: true
|
||||
command: pcs resource cleanup openstack-keystone
|
||||
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
|
||||
when: "'eventlet' in keystone_deployment and pacemaker_controlled"
|
||||
ignore_errors: true
|
||||
|
@ -31,15 +31,15 @@
|
||||
|
||||
- name: Set current_token_provider variable/fact to uuid
|
||||
set_fact: current_token_provider='uuid'
|
||||
when: "'uuid' in '{{ keystone_token_provider.stdout }}'"
|
||||
when: "'uuid' in keystone_token_provider.stdout"
|
||||
|
||||
- name: Set current_token_provider variable/fact to fernet
|
||||
set_fact: current_token_provider='fernet'
|
||||
when: "'fernet' in '{{ keystone_token_provider.stdout }}'"
|
||||
when: "'fernet' in keystone_token_provider.stdout"
|
||||
|
||||
- name: Set current_token_provider variable/fact to pkiz
|
||||
set_fact: current_token_provider='pkiz'
|
||||
when: "'pkiz' in '{{ keystone_token_provider.stdout }}'"
|
||||
when: "'pkiz' in keystone_token_provider.stdout"
|
||||
|
||||
#
|
||||
# Tasks to change token provider if necessary:
|
||||
@ -48,7 +48,7 @@
|
||||
- name: Change token provider
|
||||
become: true
|
||||
command: crudini --set /etc/keystone/keystone.conf token provider "keystone.token.providers.{{ token_provider }}.Provider"
|
||||
when: "'{{ current_token_provider }}' != '{{ token_provider }}'"
|
||||
when: "current_token_provider != token_provider"
|
||||
notify:
|
||||
- pacemaker default unmanaged
|
||||
- stop keystone service
|
||||
@ -69,12 +69,12 @@
|
||||
owner=keystone
|
||||
group=keystone
|
||||
mode=0700
|
||||
when: "'{{ token_provider }}' == 'fernet'"
|
||||
when: "token_provider == 'fernet'"
|
||||
|
||||
- name: Setup fernet keys
|
||||
become: true
|
||||
command: keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
|
||||
when: ('{{ token_provider }}' == 'fernet') and (inventory_hostname == groups['controller'][0])
|
||||
when: (token_provider == 'fernet') and (inventory_hostname == groups['controller'][0])
|
||||
|
||||
- name: Get fernet keys
|
||||
become: true
|
||||
@ -82,7 +82,7 @@
|
||||
with_items:
|
||||
- 0
|
||||
- 1
|
||||
when: ('{{ token_provider }}' == 'fernet') and (inventory_hostname == groups['controller'][0])
|
||||
when: (token_provider == 'fernet') and (inventory_hostname == groups['controller'][0])
|
||||
changed_when: false
|
||||
|
||||
- name: Copy fernet keys
|
||||
@ -91,26 +91,26 @@
|
||||
with_items:
|
||||
- "0"
|
||||
- "1"
|
||||
when: ('{{ token_provider }}' == 'fernet') and (inventory_hostname != groups['controller'][0])
|
||||
when: (token_provider == 'fernet') and (inventory_hostname != groups['controller'][0])
|
||||
|
||||
- name: Copy keystone type enforcement file
|
||||
become: true
|
||||
copy:
|
||||
src: my-keystone.te
|
||||
dest: /root/my-keystone.te
|
||||
when: "'{{ token_provider }}' == 'fernet'"
|
||||
when: "token_provider == 'fernet'"
|
||||
|
||||
- name: Create keystone.mod file
|
||||
become: true
|
||||
command: checkmodule -M -m -o /root/my-keystone.mod /root/my-keystone.te
|
||||
when: "'{{ token_provider }}' == 'fernet'"
|
||||
when: "token_provider == 'fernet'"
|
||||
|
||||
- name: Create keystone.pp file
|
||||
become: true
|
||||
command: semodule_package -o /root/my-keystone.pp -m /root/my-keystone.mod
|
||||
when: "'{{ token_provider }}' == 'fernet'"
|
||||
when: "token_provider == 'fernet'"
|
||||
|
||||
- name: Install keystone selinux policy
|
||||
become: true
|
||||
command: semodule -i /root/my-keystone.pp
|
||||
when: "'{{ token_provider }}' == 'fernet'"
|
||||
when: "token_provider == 'fernet'"
|
||||
|
@ -12,7 +12,7 @@
|
||||
- name: stop keystone eventlet
|
||||
become: true
|
||||
service: name=openstack-keystone state=stopped
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
ignore_errors: true
|
||||
|
||||
- name: restart httpd
|
||||
@ -22,7 +22,7 @@
|
||||
- name: restart keystone
|
||||
become: true
|
||||
service: name=openstack-keystone state=restarted
|
||||
when: "'eventlet' in '{{ keystone_deployment }}'"
|
||||
when: "'eventlet' in keystone_deployment"
|
||||
|
||||
- name: pacemaker managed default
|
||||
become: true
|
||||
@ -35,7 +35,7 @@
|
||||
- name: cleanup keystone
|
||||
become: true
|
||||
command: pcs resource cleanup openstack-keystone
|
||||
when: "'eventlet' in '{{ keystone_deployment }}' and pacemaker_controlled"
|
||||
when: "'eventlet' in keystone_deployment and pacemaker_controlled"
|
||||
ignore_errors: true
|
||||
|
||||
- name: cleanup httpd
|
||||
|
@ -50,7 +50,7 @@
|
||||
- { section: DEFAULT, option: admin_workers, value: "{{ workers }}" }
|
||||
- { section: eventlet_server, option: public_workers, value: "{{ workers }}" }
|
||||
- { section: eventlet_server, option: admin_workers, value: "{{ workers }}" }
|
||||
when: "'eventlet' in '{{ keystone_deployment }}'"
|
||||
when: "'eventlet' in keystone_deployment"
|
||||
notify:
|
||||
- pacemaker unmanaged default
|
||||
- stop keystone eventlet
|
||||
@ -66,7 +66,7 @@
|
||||
with_items:
|
||||
- admin
|
||||
- main
|
||||
when: "'eventlet' in '{{ keystone_deployment }}'"
|
||||
when: "'eventlet' in keystone_deployment"
|
||||
notify:
|
||||
- restart httpd
|
||||
- cleanup httpd
|
||||
@ -78,7 +78,7 @@
|
||||
state: directory
|
||||
owner: keystone
|
||||
group: keystone
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
|
||||
- name: Copy keystone in httpd files over
|
||||
become: true
|
||||
@ -92,7 +92,7 @@
|
||||
with_items:
|
||||
- admin
|
||||
- main
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Configure httpd processes/threads
|
||||
@ -115,7 +115,7 @@
|
||||
processes: "{{ workers }}"
|
||||
port: 5000
|
||||
threads: "{{ threads }}"
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
notify:
|
||||
- pacemaker unmanaged default
|
||||
- stop keystone eventlet
|
||||
@ -130,7 +130,7 @@
|
||||
with_items:
|
||||
- "{{ public_ip_addr.stdout | default('') }}:5000"
|
||||
- "{{ admin_ip_addr.stdout | default('') }}:35357"
|
||||
when: "'httpd' in '{{ keystone_deployment }}'"
|
||||
when: "'httpd' in keystone_deployment"
|
||||
notify:
|
||||
- pacemaker unmanaged default
|
||||
- stop keystone eventlet
|
||||
@ -147,7 +147,7 @@
|
||||
with_items:
|
||||
- "{{ public_ip_addr.stdout | default('') }}:5000"
|
||||
- "{{ admin_ip_addr.stdout | default('') }}:35357"
|
||||
when: "'eventlet' in '{{ keystone_deployment }}'"
|
||||
when: "'eventlet' in keystone_deployment"
|
||||
notify:
|
||||
- pacemaker unmanaged default
|
||||
- stop keystone eventlet
|
||||
|
@ -36,7 +36,7 @@
|
||||
dest: "/usr/lib/systemd/system/virtlogd.service"
|
||||
line: "LimitNOFILE={{max_open_files}}"
|
||||
insertafter: "OOMScoreAdjust=-900"
|
||||
when: replace_output.changed != true
|
||||
when: not replace_output.changed
|
||||
|
||||
- name: Issue daemon-reload
|
||||
become: true
|
||||
|
@ -82,18 +82,18 @@
|
||||
|
||||
- name: Generate hosts and ssh-config on Browbeat Machine - Default(stack)
|
||||
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_hostfile.sh -t localhost --user stack
|
||||
when: tripleo == true and (hosts_file_exists.stat.exists == false or hosts_file_exists.stat.isreg == false) and ansible_user!= "zuul"
|
||||
when: tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg) and ansible_user!= "zuul"
|
||||
|
||||
- name: Generate hosts and ssh-config on Browbeat Machine - Zuul
|
||||
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_hostfile.sh -t localhost --user zuul
|
||||
when: tripleo == true and (hosts_file_exists.stat.exists == false or hosts_file_exists.stat.isreg == false) and ansible_user== "zuul"
|
||||
when: tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg) and ansible_user== "zuul"
|
||||
|
||||
- name: Move files to correct location
|
||||
command: mv {{ home_dir }}/{{item}} {{ browbeat_path }}/ansible/{{item}}
|
||||
with_items:
|
||||
- hosts
|
||||
- heat-admin-id_rsa
|
||||
when: "(tripleo == true and (hosts_file_exists.stat.exists == false or hosts_file_exists.stat.isreg == false))"
|
||||
when: "(tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg))"
|
||||
|
||||
- name: Install requirements.txt into browbeat-venv
|
||||
pip:
|
||||
|
@ -52,7 +52,7 @@
|
||||
enabled: yes
|
||||
become: true
|
||||
register: repo_add
|
||||
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)
|
||||
when: ('controller' in group_names and opendaylight_java_plugin)
|
||||
|
||||
- name: Add key
|
||||
rpm_key:
|
||||
@ -71,14 +71,14 @@
|
||||
- java-1.8.0-openjdk
|
||||
- collectd-java
|
||||
- collectd-generic-jmx
|
||||
when: (repo_add is success and 'controller' in group_names and {{opendaylight_java_plugin}} == true)
|
||||
when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin)
|
||||
|
||||
- name: Remove repository
|
||||
yum_repository:
|
||||
name: CentOS-7-Base
|
||||
state: absent
|
||||
become: true
|
||||
when: (repo_add is success and 'controller' in group_names and {{opendaylight_java_plugin}} == true)
|
||||
when: (repo_add is success and 'controller' in group_names and opendaylight_java_plugin)
|
||||
|
||||
# Iostat plugin requires sysstat since shelling iostat for stats, Also it is
|
||||
# handy to have sysstat.
|
||||
@ -96,7 +96,7 @@
|
||||
name: "{{item}}"
|
||||
state: present
|
||||
become: true
|
||||
when: "(('controller' in group_names and {{keystone_overcloud_collectd_plugin}} == true and '{{inventory_hostname}}' == groups['controller'][0]) or ('undercloud' in group_names and {{keystone_undercloud_collectd_plugin}} == true))"
|
||||
when: "(('controller' in group_names and keystone_overcloud_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and keystone_undercloud_collectd_plugin))"
|
||||
with_items:
|
||||
- libdbi-dbd-mysql
|
||||
- collectd-dbi
|
||||
@ -118,13 +118,13 @@
|
||||
become: true
|
||||
shell: "hiera admin_password | awk '{$0=\"Environment=OS_PASSWORD=\"$0;print }'"
|
||||
register: undercloud_password
|
||||
when: "('undercloud' in group_names and {{gnocchi_status_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Undercloud) Get stackrc
|
||||
remote_user: "{{local_remote_user}}"
|
||||
shell: "cat /home/stack/stackrc | egrep '^OS_[AUT]|^OS_PRO' | awk '{$0=\"Environment=\"$0;print }'"
|
||||
register: stackrc_file
|
||||
when: "('undercloud' in group_names and {{gnocchi_status_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Undercloud) Add environment variables to collectd.service systemd file
|
||||
become: true
|
||||
@ -133,7 +133,7 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
with_items: "{{stackrc_file.stdout_lines | default(omit)}}"
|
||||
when: "('undercloud' in group_names and {{gnocchi_status_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Undercloud) Add environment variables to collectd.service systemd file
|
||||
become: true
|
||||
@ -142,14 +142,14 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
with_items: "{{undercloud_password.stdout_lines | default(omit)}}"
|
||||
when: "('undercloud' in group_names and {{gnocchi_status_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Controller, delegated to UC) Get overcloudrc
|
||||
remote_user: "{{local_remote_user}}"
|
||||
shell: "cat /home/stack/overcloudrc | grep 'export OS' | awk '{gsub(/export /,\"Environment=\");print }'"
|
||||
delegate_to: "{{groups['undercloud'][0]}}"
|
||||
register: overcloudrc_file
|
||||
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
- name: (Controller) Add environment variables to collectd.service systemd file
|
||||
become: true
|
||||
@ -158,7 +158,7 @@
|
||||
insertafter: '\[Service\]'
|
||||
line: "{{item}}"
|
||||
with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}"
|
||||
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
# Apache Request Response Timing
|
||||
- name: (Newton, Ocata) Deploy Apache httpd.conf for request timings
|
||||
@ -170,7 +170,7 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: true
|
||||
when: "('controller' in group_names and {{apache_controller_collectd_request_time}} == true) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
|
||||
when: "('controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
|
||||
|
||||
- name: (Queens/Pike) Patch Apache httpd.conf for request timings
|
||||
become: true
|
||||
@ -190,7 +190,7 @@
|
||||
name: httpd
|
||||
state: restarted
|
||||
enabled: true
|
||||
when: "('controller' in group_names and {{apache_controller_collectd_request_time}} == true) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
|
||||
when: "('controller' in group_names and apache_controller_collectd_request_time) and ('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode)"
|
||||
|
||||
- name: (Queens/Pike) Restart Gnocchi/Keystone/Nova Placement API Containers
|
||||
become: true
|
||||
@ -213,17 +213,17 @@
|
||||
owner: root
|
||||
group: root
|
||||
become: true
|
||||
when: "(('controller' in group_names and {{apache_controller_collectd_plugin}} == true) or ('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true))"
|
||||
when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))"
|
||||
|
||||
- name: (Undercloud) Allow httpd to listen to port ({{apache_undercloud_mod_status_port}})
|
||||
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_undercloud_mod_status_port}}"
|
||||
become: true
|
||||
when: "('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and apache_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Controller) Allow httpd to listen to port ({{apache_controller_mod_status_port}})
|
||||
command: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}"
|
||||
become: true
|
||||
when: "(ansible_selinux['status'] == 'enabled') and ('controller' in group_names and {{apache_controller_collectd_plugin}} == true)"
|
||||
when: "(ansible_selinux['status'] == 'enabled') and ('controller' in group_names and apache_controller_collectd_plugin)"
|
||||
|
||||
- name: Restart Apache
|
||||
service:
|
||||
@ -231,13 +231,13 @@
|
||||
state: restarted
|
||||
enabled: true
|
||||
become: true
|
||||
when: "(('controller' in group_names and {{apache_controller_collectd_plugin}} == true) or ('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true))"
|
||||
when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))"
|
||||
# End Apache Monitoring
|
||||
|
||||
- name: Reload systemd units
|
||||
command: systemctl daemon-reload
|
||||
become: true
|
||||
when: "('controller' in group_names and gnocchi_status_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin == true)"
|
||||
when: "('controller' in group_names and gnocchi_status_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (All Nodes) Copy python plugins
|
||||
copy:
|
||||
@ -288,42 +288,42 @@
|
||||
easy_install:
|
||||
name: pyrabbit
|
||||
become: true
|
||||
when: "(('controller' in group_names and {{rabbitmq_controller_collectd_plugin}} == true and '{{inventory_hostname}}' == groups['controller'][0]) or ('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true))"
|
||||
when: "(('controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))"
|
||||
|
||||
- name: Enable Rabbitmq management plugin
|
||||
command: /sbin/rabbitmq-plugins enable rabbitmq_management
|
||||
become: true
|
||||
when: "(('controller' in group_names and {{rabbitmq_controller_collectd_plugin}} == true and '{{inventory_hostname}}' == groups['controller'][0]) or ('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true))"
|
||||
when: "(('controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))"
|
||||
|
||||
- name: (Undercloud) Get ctlplane ip address
|
||||
shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}'
|
||||
register: undercloud_ctlplane_ip_address
|
||||
become: true
|
||||
when: "('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Undercloud) Get Rabbitmq username
|
||||
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_username | awk -F '=' '{print $2}'
|
||||
register: undercloud_rabbitmq_username
|
||||
when: "('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
|
||||
|
||||
- name: (Undercloud) Get Rabbitmq password
|
||||
shell: cat undercloud-passwords.conf | grep undercloud_rabbit_password | awk -F '=' '{print $2}'
|
||||
register: undercloud_rabbitmq_password
|
||||
when: "('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true)"
|
||||
when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)"
|
||||
|
||||
# Works with: Newton, Ocata
|
||||
- name: (Controller) Get Rabbitmq username
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user
|
||||
register: controller0_rabbitmq_username
|
||||
become: true
|
||||
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
# Works with: Newton, Ocata
|
||||
- name: (Controller) Get Rabbitmq password
|
||||
command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass
|
||||
register: controller0_rabbitmq_password
|
||||
become: true
|
||||
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
# End Rabbitmq monitoring
|
||||
|
||||
# Gnocchi Swift Stat Service monitoring
|
||||
@ -331,25 +331,25 @@
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_authurl
|
||||
register: controller0_gnocchi_swift_authurl
|
||||
become: true
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
- name: Get Gnocchi Swift Auth Version
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_auth_version
|
||||
register: controller0_gnocchi_swift_authversion
|
||||
become: true
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
- name: Get Gnocchi Swift User
|
||||
shell: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_user | sed 's/service://'
|
||||
register: controller0_gnocchi_swift_user
|
||||
become: true
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
|
||||
- name: Get Gnocchi Swift Key
|
||||
command: hiera -c /etc/puppet/hiera.yaml gnocchi::storage::swift::swift_key
|
||||
register: controller0_gnocchi_swift_auth_key
|
||||
become: true
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin == true and inventory_hostname == groups['controller'][0]"
|
||||
when: "'controller' in group_names and swift_stat_controller_collectd_plugin and inventory_hostname == groups['controller'][0]"
|
||||
# End Swift Stat Service monitoring
|
||||
|
||||
# CephStorage OSD monitoring
|
||||
@ -358,7 +358,7 @@
|
||||
shell: ls /var/run/ceph/ceph-osd.*.asok | head -n 1 | egrep -o '[0-9]+'
|
||||
register: cephstorage_osd_socket
|
||||
become: true
|
||||
when: "('cephstorage' in group_names and {{ceph_storage_collectd_plugin}} == true)"
|
||||
when: "('cephstorage' in group_names and ceph_storage_collectd_plugin)"
|
||||
# End CephStorage OSD monitoring
|
||||
|
||||
- name: Configure collectd.conf
|
||||
@ -377,7 +377,7 @@
|
||||
dest: /usr/lib64/libjvm.so
|
||||
state: link
|
||||
become: true
|
||||
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)
|
||||
when: ('controller' in group_names and opendaylight_java_plugin)
|
||||
|
||||
#
|
||||
# Configure selinux bits
|
||||
|
@ -9,7 +9,7 @@
|
||||
with_fileglob:
|
||||
- "{{ browbeat_path }}/elastic/templates/browbeat*"
|
||||
ignore_errors: true
|
||||
when: elastic5 == false
|
||||
when: not elastic5
|
||||
|
||||
|
||||
- name: Upload templates
|
||||
@ -21,4 +21,4 @@
|
||||
with_fileglob:
|
||||
- "{{ browbeat_path }}/elastic/v5templates/browbeat*"
|
||||
ignore_errors: true
|
||||
when: elastic5 == true
|
||||
when: elastic5
|
||||
|
@ -28,17 +28,17 @@
|
||||
|
||||
- name: Convert images to raw
|
||||
command: qemu-img convert -f {{browbeat_guest_images[item].type}} -O raw {{ home_dir }}/{{ browbeat_guest_images[item].name }}.{{ browbeat_guest_images[item].type }} {{ home_dir }}/{{ browbeat_guest_images[item].name }}.raw
|
||||
when: "browbeat_guest_images[item].convert_to_raw == true"
|
||||
when: "browbeat_guest_images[item].convert_to_raw"
|
||||
with_items: "{{ browbeat_guest_images }}"
|
||||
|
||||
- name: Upload image into cloud (Newton and Ocata versions)
|
||||
shell: . {{ overcloudrc }}; openstack image create --public --disk-format={{ browbeat_guest_images[item].type }} --container-format=bare {{ browbeat_guest_images[item].name }} < {{ home_dir }}/{{ browbeat_guest_images[item].name }}.{{ browbeat_guest_images[item].type }}
|
||||
ignore_errors: true
|
||||
when: "browbeat_guest_images[item].convert_to_raw == false"
|
||||
when: "not browbeat_guest_images[item].convert_to_raw"
|
||||
with_items: "{{ browbeat_guest_images }}"
|
||||
|
||||
- name: Upload raw image into cloud (Newton and Ocata versions)
|
||||
shell: . {{ overcloudrc }}; openstack image create --public --disk-format=raw --container-format=bare {{ browbeat_guest_images[item].name }} < {{ home_dir }}/{{ browbeat_guest_images[item].name }}.raw
|
||||
ignore_errors: true
|
||||
when: "browbeat_guest_images[item].convert_to_raw == true"
|
||||
when: "browbeat_guest_images[item].convert_to_raw"
|
||||
with_items: "{{ browbeat_guest_images }}"
|
||||
|
@ -15,7 +15,7 @@
|
||||
- { section: 'metrics_statsd', option: 'statsd_port', value: "{{ statsd_port }}"}
|
||||
- { section: 'metrics_statsd', option: 'agent_statsd_host', value: "{{ statsd_host }}"}
|
||||
- { section: 'metrics_statsd', option: 'agent_statsd_port', value: "{{ statsd_port }}"}
|
||||
when: "{{ statsd_enabled }}"
|
||||
when: statsd_enabled
|
||||
|
||||
- name: Restart Ironic services
|
||||
service:
|
||||
@ -27,4 +27,4 @@
|
||||
- openstack-ironic-conductor
|
||||
- openstack-ironic-inspector-dnsmasq
|
||||
- openstack-ironic-inspector
|
||||
when: "{{ statsd_enabled }}"
|
||||
when: statsd_enabled
|
||||
|
Loading…
Reference in New Issue
Block a user