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