From 461b016f131d06b8fa95d5481ccb024ba841ba1b Mon Sep 17 00:00:00 2001 From: Masco Kaliyamoorthy Date: Thu, 23 Jul 2020 16:31:10 +0530 Subject: [PATCH] use tripleo-ansible-inventry to generate hosts Change-Id: I54d6eba518910e6651758bc7d46624bafacaef6c --- ansible/README.rst | 21 +++++- ansible/browbeat/adjust-nova-allocation.yml | 6 +- ansible/browbeat/adjustment-apache.yml | 2 +- ansible/browbeat/adjustment-ceilometer.yml | 2 +- ansible/browbeat/adjustment-db.yml | 2 +- .../browbeat/adjustment-firewall_driver.yml | 4 +- ...justment-gnocchi-reduce-archive-policy.yml | 4 +- ansible/browbeat/adjustment-gnocchi-wsgi.yml | 2 +- ansible/browbeat/adjustment-gnocchi.yml | 2 +- ansible/browbeat/adjustment-haproxy.yml | 2 +- .../browbeat/adjustment-keystone-token.yml | 2 +- ansible/browbeat/adjustment-l3.yml | 2 +- .../browbeat/adjustment-nova-scheduler.yml | 2 +- ansible/browbeat/adjustment-workers.yml | 2 +- ansible/browbeat/clean-gnocchi-resources.yml | 2 +- ansible/browbeat/cleanlogs.yml | 2 +- ansible/browbeat/odl-open-transactions.yml | 2 +- .../roles/keystone-token/tasks/main.yml | 6 +- ansible/browbeat/scale-virtlogd.yml | 2 +- ansible/browbeat/sync-ceilometer-polling.yml | 10 +-- .../browbeat/telemetry-disable-polling.yml | 10 +-- ansible/browbeat/telemetry-disable.yml | 16 ++--- ansible/browbeat/telemetry-enable.yml | 16 ++--- ansible/browbeat/telemetry-polling.yml | 2 +- ansible/common_logging/browbeat_logging.yml | 6 +- ansible/common_logging/install_logging.yml | 6 +- ansible/gather/stockpile.yml | 6 +- ansible/generate_tripleo_hostfile.sh | 34 +++++----- ansible/generate_tripleo_inventory.sh | 54 +++++++++++++++ ansible/install/browbeat.yml | 4 +- ansible/install/collectd-baremetal.yml | 14 ++-- ansible/install/collectd-container.yml | 16 ++--- ansible/install/collectd-generic.yml | 2 +- ansible/install/grafana.yml | 2 +- ansible/install/graphite.yml | 2 +- ansible/install/ironic-statsd.yml | 2 +- .../roles/collectd-openstack/tasks/main.yml | 68 +++++++++---------- .../templates/00-browbeat_mod_status.conf.j2 | 8 +-- .../templates/controller.collectd.conf.j2 | 44 ++++++------ ansible/install/roles/collectd/tasks/main.yml | 14 ++-- .../templates/00-browbeat_mod_status.conf.j2 | 8 +-- .../templates/controller.collectd.conf.j2 | 44 ++++++------ ansible/install/roles/rally/tasks/main.yml | 2 +- ansible/install/rsyslog-logging.yml | 2 +- ansible/install/shaker_build.yml | 2 +- ansible/logs/get-overcloud-logs.yml | 4 +- ...baremetal-virt-undercloud-int-browbeat.yml | 2 +- ...metal-virt-undercloud-tripleo-browbeat.yml | 2 +- ...aremetal-virt-undercloud-yoda-browbeat.yml | 24 +++---- ansible/oooq/browbeat-minimal.yml | 2 +- ansible/oooq/configure-browbeat.yml | 2 +- ansible/oooq/gather-metadata.yml | 8 +-- ansible/oooq/install-browbeat.yml | 2 +- ansible/oooq/quickstart-browbeat.yml | 2 +- .../oooq/roles/oooq-metadata/tasks/main.yml | 2 +- ansible/oooq/undercloud-metrics.yml | 2 +- ansible/tune/tune.yml | 2 +- browbeat/prescribe.py | 4 +- 58 files changed, 294 insertions(+), 227 deletions(-) create mode 100755 ansible/generate_tripleo_inventory.sh diff --git a/ansible/README.rst b/ansible/README.rst index 7fd3f211c..931ce0c59 100644 --- a/ansible/README.rst +++ b/ansible/README.rst @@ -33,12 +33,27 @@ Install your public key into stack's authorized\_keys # ssh-copy-id stack@ -Then run generate\_tripleo\_hosts.sh script to generate your overcloud's -hosts file for ansible and generate a "jumpbox" ssh config: +Generate overcloud's inventory file +----------------------------------- + +Currently we have two scripts to generate overcloud's inventory file. + 1. generate_tripleo_inventory.sh + 2. generate_tripleo_hostfile.sh + +`generate_tripleo_inventory.sh` is the recommended way to generate the overcloud inventory file. +It will use the `tripleo-ansible-inventory` command to generate the inventory file. +It is faster and maintained with tripleo release. :: - # ./generate_tripleo_hostfile.sh ~/.ssh/config + # ./generate_tripleo_inventory.sh + +`generate_tripleo_hostfile.sh` is a shell script that will ssh to each machine and prepare the inventory file. +It is deprecated now and very slow, It may get removed in future releases. + +:: + + # ./generate_tripleo_hostfile.sh Review the hosts file the script generates. diff --git a/ansible/browbeat/adjust-nova-allocation.yml b/ansible/browbeat/adjust-nova-allocation.yml index 170e49950..b2eafb40e 100644 --- a/ansible/browbeat/adjust-nova-allocation.yml +++ b/ansible/browbeat/adjust-nova-allocation.yml @@ -22,7 +22,7 @@ # ansible-playbook -i hosts browbeat/adjust-nova-allocation.yml # -- hosts: controller,compute +- hosts: Controller,Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: @@ -117,7 +117,7 @@ - httpd when: - "'Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode" - - "'controller' in group_names" + - "'Controller' in group_names" - restart_nova - name: (Pike, Queens) Restart Nova Compute Container @@ -125,5 +125,5 @@ command: docker restart nova_compute when: - "('Pike' in osp_version['content'] | b64decode or 'Queens' in osp_version['content'] | b64decode)" - - "'compute' in group_names" + - "'Compute' in group_names" - restart_nova diff --git a/ansible/browbeat/adjustment-apache.yml b/ansible/browbeat/adjustment-apache.yml index 5a82a3d04..f884d3132 100644 --- a/ansible/browbeat/adjustment-apache.yml +++ b/ansible/browbeat/adjustment-apache.yml @@ -9,7 +9,7 @@ # ansible-playbook -i hosts browbeat/adjustment-httpd.yml -e 'httpd_startservers=8 httpd_minspareservers=5 httpd_maxspareservers=20 httpd_serverlimit=256 httpd_maxclients=256 httpd_maxrequestsperchild=4000' # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-ceilometer.yml b/ansible/browbeat/adjustment-ceilometer.yml index 5067ad4ec..c438df789 100644 --- a/ansible/browbeat/adjustment-ceilometer.yml +++ b/ansible/browbeat/adjustment-ceilometer.yml @@ -18,7 +18,7 @@ # ansible-playbook -i hosts browbeat/adjustment-ceilometer.yml # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-db.yml b/ansible/browbeat/adjustment-db.yml index fd804bd0b..0d269c1db 100644 --- a/ansible/browbeat/adjustment-db.yml +++ b/ansible/browbeat/adjustment-db.yml @@ -2,7 +2,7 @@ # # -- hosts: controller +- hosts: Controller remote_user: heat-admin gather_facts: false vars: diff --git a/ansible/browbeat/adjustment-firewall_driver.yml b/ansible/browbeat/adjustment-firewall_driver.yml index c7cb19f51..7381978bc 100644 --- a/ansible/browbeat/adjustment-firewall_driver.yml +++ b/ansible/browbeat/adjustment-firewall_driver.yml @@ -1,4 +1,4 @@ -- hosts: controller +- hosts: Controller remote_user: heat-admin gather_facts: false vars: @@ -7,7 +7,7 @@ roles: - neutron-firewall -- hosts: compute +- hosts: Compute remote_user: heat-admin gather_facts: false vars: diff --git a/ansible/browbeat/adjustment-gnocchi-reduce-archive-policy.yml b/ansible/browbeat/adjustment-gnocchi-reduce-archive-policy.yml index b3e4372cb..e7e3b2828 100644 --- a/ansible/browbeat/adjustment-gnocchi-reduce-archive-policy.yml +++ b/ansible/browbeat/adjustment-gnocchi-reduce-archive-policy.yml @@ -5,7 +5,7 @@ # Versions tested: Newton, Ocata # -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" gather_facts: false vars_files: @@ -14,7 +14,7 @@ - name: Create low-workload archive-policy shell: ". {{ overcloudrc }}; gnocchi archive-policy create -d points:8640,granularity:0:05:00 -b 0 -m std -m count -m min -m max -m sum -m mean low-workload" -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-gnocchi-wsgi.yml b/ansible/browbeat/adjustment-gnocchi-wsgi.yml index c97717b79..6772967b5 100644 --- a/ansible/browbeat/adjustment-gnocchi-wsgi.yml +++ b/ansible/browbeat/adjustment-gnocchi-wsgi.yml @@ -9,7 +9,7 @@ # ansible-playbook -i hosts browbeat/adjustment-gnocchi-wsgi.yml -e "gnocchi_api_processes=24 gnocchi_api_threads=6" # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-gnocchi.yml b/ansible/browbeat/adjustment-gnocchi.yml index 674a783b5..939bd8d82 100644 --- a/ansible/browbeat/adjustment-gnocchi.yml +++ b/ansible/browbeat/adjustment-gnocchi.yml @@ -9,7 +9,7 @@ # ansible-playbook -i hosts browbeat/adjustment-gnocchi.yml -e 'metricd_workers=12 metric_processing_delay=30 processing_replicas=3' # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-haproxy.yml b/ansible/browbeat/adjustment-haproxy.yml index 0cae2517e..96edc70e9 100644 --- a/ansible/browbeat/adjustment-haproxy.yml +++ b/ansible/browbeat/adjustment-haproxy.yml @@ -9,7 +9,7 @@ # ansible-playbook -i hosts browbeat/adjustment-haproxy.yml -e 'old_maxconn=4096 new_maxconn=8192' # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-keystone-token.yml b/ansible/browbeat/adjustment-keystone-token.yml index b2f7364ca..4aa2c6268 100644 --- a/ansible/browbeat/adjustment-keystone-token.yml +++ b/ansible/browbeat/adjustment-keystone-token.yml @@ -7,7 +7,7 @@ # ansible-playbook -i hosts browbeat/adjustment-keystone-token.yml -e "token_provider=uuid" # -- hosts: controller +- hosts: Controller remote_user: heat-admin pre_tasks: - name: Check for variable (token_provider) diff --git a/ansible/browbeat/adjustment-l3.yml b/ansible/browbeat/adjustment-l3.yml index e11981f2b..73073a175 100644 --- a/ansible/browbeat/adjustment-l3.yml +++ b/ansible/browbeat/adjustment-l3.yml @@ -6,7 +6,7 @@ # ansible-playbook -i hosts browbeat/adjustment-l3.yml -e "max_l3_agents=3 min_l3_agents=3" # -- hosts: controller +- hosts: Controller remote_user: heat-admin gather_facts: false vars: diff --git a/ansible/browbeat/adjustment-nova-scheduler.yml b/ansible/browbeat/adjustment-nova-scheduler.yml index 02a961bcf..5926bfce6 100644 --- a/ansible/browbeat/adjustment-nova-scheduler.yml +++ b/ansible/browbeat/adjustment-nova-scheduler.yml @@ -22,7 +22,7 @@ # ansible-playbook -i hosts browbeat/adjustment-nova-scheduler.yml # -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/adjustment-workers.yml b/ansible/browbeat/adjustment-workers.yml index a39c39046..11537fb9f 100644 --- a/ansible/browbeat/adjustment-workers.yml +++ b/ansible/browbeat/adjustment-workers.yml @@ -12,7 +12,7 @@ # ansible-playbook -i hosts browbeat/adjustment-workers.yml -e "service=keystone workers=12 keystone_deployment=httpd" # -- hosts: controller +- hosts: Controller remote_user: heat-admin gather_facts: false vars: diff --git a/ansible/browbeat/clean-gnocchi-resources.yml b/ansible/browbeat/clean-gnocchi-resources.yml index 47e0701b9..854d5dde0 100644 --- a/ansible/browbeat/clean-gnocchi-resources.yml +++ b/ansible/browbeat/clean-gnocchi-resources.yml @@ -6,7 +6,7 @@ # use the same new archive-policy. # -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/cleanlogs.yml b/ansible/browbeat/cleanlogs.yml index 7668e14ea..0e48cf358 100644 --- a/ansible/browbeat/cleanlogs.yml +++ b/ansible/browbeat/cleanlogs.yml @@ -3,7 +3,7 @@ # Playbook to clean log files on controller nodes # -- hosts: controller +- hosts: Controller remote_user: heat-admin gather_facts: false tasks: diff --git a/ansible/browbeat/odl-open-transactions.yml b/ansible/browbeat/odl-open-transactions.yml index 942fdfcbb..e1e712b2a 100644 --- a/ansible/browbeat/odl-open-transactions.yml +++ b/ansible/browbeat/odl-open-transactions.yml @@ -1,4 +1,4 @@ -- hosts: controller +- hosts: Controller remote_user: "{{host_remote_user}}" vars_files: - ../install/group_vars/all.yml diff --git a/ansible/browbeat/roles/keystone-token/tasks/main.yml b/ansible/browbeat/roles/keystone-token/tasks/main.yml index d637327c7..d8fe6d824 100644 --- a/ansible/browbeat/roles/keystone-token/tasks/main.yml +++ b/ansible/browbeat/roles/keystone-token/tasks/main.yml @@ -74,7 +74,7 @@ - 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,7 +91,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]) - name: Copy keystone type enforcement file become: true diff --git a/ansible/browbeat/scale-virtlogd.yml b/ansible/browbeat/scale-virtlogd.yml index 9eee28df0..6b810381b 100644 --- a/ansible/browbeat/scale-virtlogd.yml +++ b/ansible/browbeat/scale-virtlogd.yml @@ -11,7 +11,7 @@ # ansible-playbook -i hosts browbeat/scale-virtlogd.yml -e 'max_open_files=10000' # -- hosts: compute +- hosts: Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/browbeat/sync-ceilometer-polling.yml b/ansible/browbeat/sync-ceilometer-polling.yml index cf9f15bf1..02169aecb 100644 --- a/ansible/browbeat/sync-ceilometer-polling.yml +++ b/ansible/browbeat/sync-ceilometer-polling.yml @@ -10,7 +10,7 @@ # ansible-playbook -i hosts browbeat/sync-ceilometer-polling.yml -e 'task_time=18:25' # -- hosts: controller,compute +- hosts: Controller,Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: @@ -25,22 +25,22 @@ - name: (Newton, Ocata) Set Controller Task set_fact: the_task: "systemctl restart openstack-ceilometer-central.service" - when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('controller' in group_names)" + when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('Controller' in group_names)" - name: (Newton, Ocata) Set Compute Task set_fact: the_task: "systemctl restart openstack-ceilometer-compute.service" - when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('compute' in group_names)" + when: "('Newton' in osp_version['content'] | b64decode or 'Ocata' in osp_version['content'] | b64decode) and ('Compute' in group_names)" - name: (Pike) Set Controller Task set_fact: the_task: "docker restart ceilometer_agent_central" - when: "('Pike' in osp_version['content'] | b64decode) and ('controller' in group_names)" + when: "('Pike' in osp_version['content'] | b64decode) and ('Controller' in group_names)" - name: (Pike) Set Compute Task set_fact: the_task: "docker restart ceilometer_agent_compute" - when: "('Pike' in osp_version['content'] | b64decode) and ('compute' in group_names)" + when: "('Pike' in osp_version['content'] | b64decode) and ('Compute' in group_names)" roles: - run-task-at diff --git a/ansible/browbeat/telemetry-disable-polling.yml b/ansible/browbeat/telemetry-disable-polling.yml index 9e48c0704..3edec6a60 100644 --- a/ansible/browbeat/telemetry-disable-polling.yml +++ b/ansible/browbeat/telemetry-disable-polling.yml @@ -5,7 +5,7 @@ # Cuts off the flow of measures into the backlog. # -- hosts: controller, compute +- hosts: Controller, Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: @@ -20,22 +20,22 @@ - name: (Ocata) Set Controller Polling Daemon set_fact: polling_daemon: "openstack-ceilometer-central.service" - when: "('Ocata' in osp_version['content'] | b64decode) and ('controller' in group_names)" + when: "('Ocata' in osp_version['content'] | b64decode) and ('Controller' in group_names)" - name: (Ocata) Set Compute Polling Daemon set_fact: polling_daemon: "openstack-ceilometer-compute.service" - when: "('Ocata' in osp_version['content'] | b64decode) and ('compute' in group_names)" + when: "('Ocata' in osp_version['content'] | b64decode) and ('Compute' in group_names)" - name: (Pike) Set Controller Polling Daemon set_fact: polling_daemon: "openstack-ceilometer-polling.service" - when: "('Pike' in osp_version['content'] | b64decode) and ('controller' in group_names)" + when: "('Pike' in osp_version['content'] | b64decode) and ('Controller' in group_names)" - name: (Pike) Set Compute Polling Daemon set_fact: polling_daemon: "openstack-ceilometer-polling.service" - when: "('Pike' in osp_version['content'] | b64decode) and ('compute' in group_names)" + when: "('Pike' in osp_version['content'] | b64decode) and ('Compute' in group_names)" - name: Stopping Ceilometer Polling Daemon systemd: diff --git a/ansible/browbeat/telemetry-disable.yml b/ansible/browbeat/telemetry-disable.yml index 474875377..c769c8bff 100644 --- a/ansible/browbeat/telemetry-disable.yml +++ b/ansible/browbeat/telemetry-disable.yml @@ -3,7 +3,7 @@ # Playbook to disable Telemetry Services # -- hosts: controller, compute +- hosts: Controller, Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: @@ -67,7 +67,7 @@ dest: /root/10-gnocchi_wsgi.conf - src: /etc/httpd/conf.d/10-panko_wsgi.conf dest: /root/10-panko_wsgi.conf - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Delete HTTPD wsgi service config files in order to temporarily disable them become: true @@ -79,21 +79,21 @@ - "/etc/httpd/conf.d/10-ceilometer_wsgi.conf" - "/etc/httpd/conf.d/10-gnocchi_wsgi.conf" - "/etc/httpd/conf.d/10-panko_wsgi.conf" - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Stopping Telemetry Controller Services systemd: name: "{{ item }}" state: stopped with_items: "{{controller_services}}" - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Stopping Telemetry Compute Services systemd: name: "{{ item }}" state: stopped with_items: "{{compute_services}}" - when: "'compute' in group_names" + when: "'Compute' in group_names" - name: Setting Nova Notification Driver to noop become: true @@ -130,7 +130,7 @@ group: keystone - dest: /etc/neutron/neutron.conf group: neutron - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Restart Controller Services to disable notifications systemd: @@ -145,10 +145,10 @@ - openstack-nova-conductor.service - openstack-nova-scheduler.service - httpd - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Restart Nova Compute Service to disable notifications systemd: name: openstack-nova-compute.service state: restarted - when: "'compute' in group_names" + when: "'Compute' in group_names" diff --git a/ansible/browbeat/telemetry-enable.yml b/ansible/browbeat/telemetry-enable.yml index f6dee2384..9df8329ed 100644 --- a/ansible/browbeat/telemetry-enable.yml +++ b/ansible/browbeat/telemetry-enable.yml @@ -3,7 +3,7 @@ # Playbook to reverse disable Telemetry Services playbook # -- hosts: controller, compute +- hosts: Controller, Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: @@ -67,7 +67,7 @@ dest: /etc/httpd/conf.d/10-gnocchi_wsgi.conf - src: /root/10-panko_wsgi.conf dest: /etc/httpd/conf.d/10-panko_wsgi.conf - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Clean Up HTTPD wsgi service config files in /root become: true @@ -79,21 +79,21 @@ - "/root/10-ceilometer_wsgi.conf" - "/root/10-gnocchi_wsgi.conf" - "/root/10-panko_wsgi.conf" - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Starting Telemetry Controller Services systemd: name: "{{ item }}" state: started with_items: "{{controller_services}}" - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Starting Telemetry Compute Service(s) systemd: name: "{{ item }}" state: started with_items: "{{compute_services}}" - when: "'compute' in group_names" + when: "'Compute' in group_names" - name: Setting Nova Notification Driver to messagingv2 become: true @@ -135,7 +135,7 @@ - dest: /etc/neutron/neutron.conf group: neutron value: - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Restart Controller Services to enable notifications systemd: @@ -150,10 +150,10 @@ - openstack-nova-conductor.service - openstack-nova-scheduler.service - httpd - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: Restart Nova Compute Services to enable notifications systemd: name: openstack-nova-compute.service state: restarted - when: "'compute' in group_names" + when: "'Compute' in group_names" diff --git a/ansible/browbeat/telemetry-polling.yml b/ansible/browbeat/telemetry-polling.yml index c05a77fa2..dd8300af9 100644 --- a/ansible/browbeat/telemetry-polling.yml +++ b/ansible/browbeat/telemetry-polling.yml @@ -13,7 +13,7 @@ # Remember to sync polling daemons afterwards (Restarting openstack-ceilometer-[central,compute]) # -- hosts: controller,compute +- hosts: Controller,Compute remote_user: "{{ host_remote_user }}" gather_facts: false vars_files: diff --git a/ansible/common_logging/browbeat_logging.yml b/ansible/common_logging/browbeat_logging.yml index 6b881ed91..987eaa798 100644 --- a/ansible/common_logging/browbeat_logging.yml +++ b/ansible/common_logging/browbeat_logging.yml @@ -1,18 +1,18 @@ -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" vars_files: - ../install/group_vars/all.yml roles: - { role: browbeat_logging } -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" vars_files: - ../install/group_vars/all.yml roles: - { role: browbeat_logging } -- hosts: compute +- hosts: Compute remote_user: "{{ host_remote_user }}" vars_files: - ../install/group_vars/all.yml diff --git a/ansible/common_logging/install_logging.yml b/ansible/common_logging/install_logging.yml index 5f6664c8a..3d70da441 100644 --- a/ansible/common_logging/install_logging.yml +++ b/ansible/common_logging/install_logging.yml @@ -1,4 +1,4 @@ -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" vars_files: - ../install/group_vars/all.yml @@ -8,7 +8,7 @@ - { role: osp_version } - { role: filebeat_setup } -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" vars_files: - ../install/group_vars/all.yml @@ -18,7 +18,7 @@ - { role: osp_version } - { role: filebeat_setup } -- hosts: compute +- hosts: Compute remote_user: "{{ host_remote_user }}" vars_files: - ../install/group_vars/all.yml diff --git a/ansible/gather/stockpile.yml b/ansible/gather/stockpile.yml index 8f8f52b4a..007d9b464 100644 --- a/ansible/gather/stockpile.yml +++ b/ansible/gather/stockpile.yml @@ -3,7 +3,7 @@ # For podman containers change "container_cli" configuration to podman # -- hosts: stockpile +- hosts: Stockpile tasks: - name: setting facts needed set_fact: @@ -16,7 +16,7 @@ set_fact: overcloud_user: "{{ host_remote_user }}" -- hosts: undercloud +- hosts: Undercloud tasks: - name: setting facts set_fact: @@ -26,7 +26,7 @@ vars: stockpile_output_path: "{{ md_output_path }}" -- hosts: stockpile +- hosts: Stockpile tasks: - name: run prescribe command: '"{{ ansible_python.executable }}" {{ browbeat_path }}/browbeat/prescribe.py {{ browbeat_path }}/metadata' diff --git a/ansible/generate_tripleo_hostfile.sh b/ansible/generate_tripleo_hostfile.sh index bf26d3c0c..530143815 100755 --- a/ansible/generate_tripleo_hostfile.sh +++ b/ansible/generate_tripleo_hostfile.sh @@ -281,7 +281,7 @@ echo "---------------------------" echo "Creating ansible inventory file:" echo "---------------------------" echo "" -echo "[browbeat]" | tee ${ansible_inventory_file} +echo "[Browbeat]" | tee ${ansible_inventory_file} echo "# Pick host depending on desired install" | tee -a ${ansible_inventory_file} if [ "${uncomment_localhost}" = true ]; then echo "localhost" | tee -a ${ansible_inventory_file} @@ -291,10 +291,10 @@ else echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} fi echo "" | tee -a ${ansible_inventory_file} -echo "[undercloud]" | tee -a ${ansible_inventory_file} +echo "[Undercloud]" | tee -a ${ansible_inventory_file} echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file} -echo "[controller]" | tee -a ${ansible_inventory_file} +echo "[Controller]" | tee -a ${ansible_inventory_file} if [[ ${#controller_hn} -gt 0 ]]; then for ct in ${controller_hn[@]}; do ironic_uuid='' @@ -310,7 +310,7 @@ if [[ ${#controller_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[networker]" | tee -a ${ansible_inventory_file} +echo "[Networker]" | tee -a ${ansible_inventory_file} if [[ ${#networker_hn} -gt 0 ]]; then for networker in ${networker_hn[@]}; do ironic_uuid='' @@ -326,7 +326,7 @@ if [[ ${#networker_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[blockstorage]" | tee -a ${ansible_inventory_file} +echo "[BlockStorage]" | tee -a ${ansible_inventory_file} if [[ ${#blockstorage_hn} -gt 0 ]]; then for blockstorage in ${blockstorage_hn[@]}; do ironic_uuid='' @@ -342,7 +342,7 @@ if [[ ${#blockstorage_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[objectstorage]" | tee -a ${ansible_inventory_file} +echo "[ObjectStorage]" | tee -a ${ansible_inventory_file} if [[ ${#objectstorage_hn} -gt 0 ]]; then for objectstorage in ${objectstorage_hn[@]}; do ironic_uuid='' @@ -358,7 +358,7 @@ if [[ ${#objectstorage_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[cephstorage]" | tee -a ${ansible_inventory_file} +echo "[CephStorage]" | tee -a ${ansible_inventory_file} if [[ ${#cephstorage_hn} -gt 0 ]]; then for cephstorage in ${cephstorage_hn[@]}; do ironic_uuid='' @@ -374,7 +374,7 @@ if [[ ${#cephstorage_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[compute]" | tee -a ${ansible_inventory_file} +echo "[Compute]" | tee -a ${ansible_inventory_file} if [[ ${#compute_hn} -gt 0 ]]; then for compute in ${compute_hn[@]}; do ironic_uuid='' @@ -393,22 +393,22 @@ if [[ ${#controller_hn} -gt 0 ]] || [[ ${#blockstorage_hn} -gt 0 ]] || [[ ${#obj echo "" | tee -a ${ansible_inventory_file} echo "[overcloud:children]" | tee -a ${ansible_inventory_file} if [[ ${#controller_hn} -gt 0 ]]; then - echo "controller" | tee -a ${ansible_inventory_file} + echo "Controller" | tee -a ${ansible_inventory_file} fi if [[ ${#networker_hn} -gt 0 ]]; then - echo "networker" | tee -a ${ansible_inventory_file} + echo "Networker" | tee -a ${ansible_inventory_file} fi if [[ ${#blockstorage_hn} -gt 0 ]]; then - echo "blockstorage" | tee -a ${ansible_inventory_file} + echo "BlockStorage" | tee -a ${ansible_inventory_file} fi if [[ ${#objectstorage_hn} -gt 0 ]]; then - echo "objectstorage" | tee -a ${ansible_inventory_file} + echo "ObjectStorage" | tee -a ${ansible_inventory_file} fi if [[ ${#cephstorage_hn} -gt 0 ]]; then - echo "cephstorage" | tee -a ${ansible_inventory_file} + echo "CephStorage" | tee -a ${ansible_inventory_file} fi if [[ ${#compute_hn} -gt 0 ]]; then - echo "compute" | tee -a ${ansible_inventory_file} + echo "Compute" | tee -a ${ansible_inventory_file} fi echo "" | tee -a ${ansible_inventory_file} echo "[overcloud:vars]" | tee -a ${ansible_inventory_file} @@ -422,11 +422,11 @@ if [[ ${#other_hn} -gt 0 ]]; then done fi echo "" | tee -a ${ansible_inventory_file} -echo "[graphite]" | tee -a ${ansible_inventory_file} +echo "[Graphite]" | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file} echo "#host-01" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file} -echo "[grafana]" | tee -a ${ansible_inventory_file} +echo "[Grafana]" | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file} echo "#host-02" | tee -a ${ansible_inventory_file} @@ -440,7 +440,7 @@ echo "[elk-client]" | tee -a ${ansible_inventory_file} echo "## example host entry." | tee -a ${ansible_inventory_file} echo "#host-02" | tee -a ${ansible_inventory_file} echo "" | tee -a ${ansible_inventory_file} -echo "[stockpile]" | tee -a ${ansible_inventory_file} +echo "[Stockpile]" | tee -a ${ansible_inventory_file} echo "undercloud ansible_user=${user}" | tee -a ${ansible_inventory_file} echo "---------------------------" diff --git a/ansible/generate_tripleo_inventory.sh b/ansible/generate_tripleo_inventory.sh new file mode 100755 index 000000000..d6204fb04 --- /dev/null +++ b/ansible/generate_tripleo_inventory.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +function usage +{ + echo "usage: generate_tripleo_hostfile.sh" + echo " [-t | --tripleo_ip_address [-l | --localhost]]" + echo " [-o | --overcloud_stack_name ]" + echo " [-u | --user ]" + echo " [-c | --ceph_stack_name ]" + echo " [-h | --help]" + echo "Generates ssh config file to use with an TripleO undercloud host as a jumpbox and creates ansible inventory file." +} + +user="stack" +uncomment_localhost=false +tripleo_ip_address= + +while [ "$1" != "" ]; do + case $1 in + -l | --localhost ) uncomment_localhost=true + tripleo_ip_address="localhost" + ;; + -t | --tripleo_ip_address ) + shift + tripleo_ip_address=$1 + ;; + -u | --user ) + shift + user=$1 + ;; + -h | --help ) usage + exit + ;; + * ) usage + exit 1 + esac + shift +done +if [ -z "$tripleo_ip_address" ]; then + usage + exit 1 +fi + +out_file="hosts.yml" +if [ $uncomment_localhost ]; then + source ~/stackrc + tripleo-ansible-inventory --static-yaml-inventory ${out_file} +else + file_path=$(ssh -tt -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" ${user}@${tripleo_ip_address} ". ~/stackrc; tripleo-ansible-inventory --static-yaml-inventory ${out_file}; pwd ${out_file}") + scp -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" ${user}@${tripleo_ip_address}:${file_path}/${out_file} . +fi + +sed -i '1iBrowbeat:\n hosts:\n undercloud: {}' ${out_file} +sed -i '$aStockpile:\n hosts:\n undercloud: {}' ${out_file} diff --git a/ansible/install/browbeat.yml b/ansible/install/browbeat.yml index 762b787ad..f13985135 100644 --- a/ansible/install/browbeat.yml +++ b/ansible/install/browbeat.yml @@ -3,7 +3,7 @@ # Playbook to install Browbeat (Rally + Shaker) on undercloud # -- hosts: browbeat +- hosts: Browbeat remote_user: "{{ browbeat_user }}" roles: - common @@ -19,7 +19,7 @@ - { role: workloads, when: install_browbeat_workloads} environment: "{{proxy_env}}" -- hosts: controller, compute +- hosts: Controller, Compute remote_user: "{{ host_remote_user }}" roles: - no-sshd-dns diff --git a/ansible/install/collectd-baremetal.yml b/ansible/install/collectd-baremetal.yml index 6311b93c8..8ba6f8fff 100644 --- a/ansible/install/collectd-baremetal.yml +++ b/ansible/install/collectd-baremetal.yml @@ -16,7 +16,7 @@ # -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" vars: config_type: undercloud @@ -34,7 +34,7 @@ tags: undercloud environment: "{{proxy_env}}" -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" vars: config_type: controller @@ -53,7 +53,7 @@ tags: controller environment: "{{proxy_env}}" -- hosts: networker +- hosts: Networker remote_user: "{{ host_remote_user }}" vars: config_type: networker @@ -71,7 +71,7 @@ tags: networker environment: "{{proxy_env}}" -- hosts: blockstorage +- hosts: BlockStorage remote_user: "{{ host_remote_user }}" vars: config_type: blockstorage @@ -89,7 +89,7 @@ tags: blockstorage environment: "{{proxy_env}}" -- hosts: objectstorage +- hosts: ObjectStorage remote_user: "{{ host_remote_user }}" vars: config_type: objectstorage @@ -107,7 +107,7 @@ tags: objectstorage environment: "{{proxy_env}}" -- hosts: cephstorage +- hosts: CephStorage remote_user: "{{ host_remote_user }}" vars: config_type: cephstorage @@ -125,7 +125,7 @@ tags: cephstorage environment: "{{proxy_env}}" -- hosts: compute +- hosts: Compute remote_user: "{{ host_remote_user }}" vars: config_type: compute diff --git a/ansible/install/collectd-container.yml b/ansible/install/collectd-container.yml index d4aeb1a7e..f13c8f95c 100644 --- a/ansible/install/collectd-container.yml +++ b/ansible/install/collectd-container.yml @@ -9,7 +9,7 @@ # ansible-playbook -i hosts install/collectd.yml --tags="compute" -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" vars: config_type: undercloud @@ -21,7 +21,7 @@ tags: undercloud environment: "{{proxy_env}}" -- hosts: controller +- hosts: Controller remote_user: "{{ host_remote_user }}" vars: config_type: controller @@ -32,7 +32,7 @@ - { role: collectd, when: collectd_controller|bool } tags: controller -- hosts: compute +- hosts: Compute remote_user: "{{ host_remote_user }}" vars: config_type: compute @@ -43,7 +43,7 @@ - { role: collectd, when: collectd_compute|bool } tags: compute -- hosts: networker +- hosts: Networker remote_user: "{{ host_remote_user }}" vars: config_type: networker @@ -54,7 +54,7 @@ - { role: collectd, when: collectd_networker|bool } tags: networker -- hosts: blockstroage +- hosts: BlockStroage remote_user: "{{ host_remote_user }}" vars: config_type: blockstorage @@ -65,7 +65,7 @@ - { role: collectd, when: collectd_blockstorage|bool } tags: blockstorage -- hosts: objectstorage +- hosts: ObjectStorage remote_user: "{{ host_remote_user }}" vars: config_type: objectstorage @@ -76,7 +76,7 @@ - { role: collectd, when: collectd_objectstorage|bool } tags: objectstorage -- hosts: cephstorage +- hosts: CephStorage remote_user: "{{ host_remote_user }}" vars: config_type: cephstorage @@ -86,5 +86,3 @@ - { role: common, when: collectd_cephstorage|bool } - { role: collectd, when: collectd_cephstorage|bool } tags: cephstorage - - diff --git a/ansible/install/collectd-generic.yml b/ansible/install/collectd-generic.yml index 1777e34a4..e671decf0 100644 --- a/ansible/install/collectd-generic.yml +++ b/ansible/install/collectd-generic.yml @@ -30,7 +30,7 @@ tags: guest environment: "{{proxy_env}}" -- hosts: graphite +- hosts: Graphite remote_user: root vars: config_type: graphite diff --git a/ansible/install/grafana.yml b/ansible/install/grafana.yml index f0b1ea377..023013934 100644 --- a/ansible/install/grafana.yml +++ b/ansible/install/grafana.yml @@ -3,7 +3,7 @@ # Playbook to install Grafana # -- hosts: grafana +- hosts: Grafana remote_user: root roles: - {role: epel, when: ansible_distribution_major_version == '7'} diff --git a/ansible/install/graphite.yml b/ansible/install/graphite.yml index 2bae968c3..d5ed582b3 100644 --- a/ansible/install/graphite.yml +++ b/ansible/install/graphite.yml @@ -3,7 +3,7 @@ # Playbook to install Carbon and Graphite # -- hosts: graphite +- hosts: Graphite remote_user: root roles: - {role: epel, when: ansible_distribution_major_version == '7'} diff --git a/ansible/install/ironic-statsd.yml b/ansible/install/ironic-statsd.yml index 16d640b4a..7e91d4f6a 100644 --- a/ansible/install/ironic-statsd.yml +++ b/ansible/install/ironic-statsd.yml @@ -2,7 +2,7 @@ # # enables Ironic StatsD metrics and points at the StatsD host configured in groupvars/all.yml -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" roles: - statsd-ironic diff --git a/ansible/install/roles/collectd-openstack/tasks/main.yml b/ansible/install/roles/collectd-openstack/tasks/main.yml index c2c795dee..66db80d74 100644 --- a/ansible/install/roles/collectd-openstack/tasks/main.yml +++ b/ansible/install/roles/collectd-openstack/tasks/main.yml @@ -58,7 +58,7 @@ name: "{{item}}" state: present become: 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))" + 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 @@ -69,24 +69,24 @@ command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password become: true register: mysql_root_password - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: (Undercloud) Get mysql root password shell: cat /home/stack/undercloud-passwords.conf | grep 'undercloud_db_password=' | sed 's/undercloud_db_password=//g' register: undercloud_mysql_password - when: "'undercloud' in group_names" + when: "'Undercloud' in group_names" - name: (Undercloud) Get password 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)" + 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)" + when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" - name: (Undercloud) Add environment variables to collectd.service systemd file become: true @@ -95,7 +95,7 @@ insertafter: '\[Service\]' line: "{{item}}" with_items: "{{stackrc_file.stdout_lines | default(omit)}}" - when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" + when: "('Undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" - name: (Undercloud) Add environment variables to collectd.service systemd file become: true @@ -104,14 +104,14 @@ insertafter: '\[Service\]' line: "{{item}}" with_items: "{{undercloud_password.stdout_lines | default(omit)}}" - when: "('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" + 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]}}" + delegate_to: "{{groups['Undercloud'][0]}}" register: overcloudrc_file - when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin 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 @@ -120,7 +120,7 @@ insertafter: '\[Service\]' line: "{{item}}" with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}" - when: "'controller' in group_names and gnocchi_status_controller_collectd_plugin 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 @@ -132,7 +132,7 @@ group: root mode: 0644 backup: true - 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)" + 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 @@ -142,7 +142,7 @@ - /var/lib/config-data/puppet-generated/keystone/etc/httpd/conf/httpd.conf - /var/lib/config-data/puppet-generated/nova_placement/etc/httpd/conf/httpd.conf when: - - "'controller' in group_names" + - "'Controller' in group_names" - apache_controller_collectd_request_time - "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)" @@ -152,7 +152,7 @@ name: httpd state: restarted enabled: true - 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)" + 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 @@ -162,7 +162,7 @@ - keystone - nova_placement when: - - "'controller' in group_names" + - "'Controller' in group_names" - apache_controller_collectd_request_time - "('Queens' in osp_version['content'] | b64decode or 'Pike' in osp_version['content'] | b64decode)" # End Apache Request Response Timing @@ -175,17 +175,17 @@ owner: root group: root become: true - when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))" + 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)" + 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)" + when: "(ansible_selinux['status'] == 'enabled') and ('Controller' in group_names and apache_controller_collectd_plugin)" - name: Restart Apache service: @@ -193,13 +193,13 @@ state: restarted enabled: true become: true - when: "(('controller' in group_names and apache_controller_collectd_plugin) or ('undercloud' in group_names and apache_undercloud_collectd_plugin))" + 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 and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and gnocchi_status_undercloud_collectd_plugin)" + 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: @@ -230,7 +230,7 @@ dest: /usr/local/bin/collectd_rabbitmq_monitoring.py - src: collectd_swift_stat.py dest: /usr/local/bin/collectd_swift_stat.py - when: "('controller' in group_names and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names)" + when: "('Controller' in group_names and inventory_hostname == groups['Controller'][0]) or ('Undercloud' in group_names)" - name: Copy python plugins copy: @@ -243,7 +243,7 @@ with_items: - src: collectd_ovsagent.py dest: /usr/local/bin/collectd_ovsagent.py - when: "('controller' in group_names ) or ('compute' in group_names) or ('networker' in group_names)" + when: "('Controller' in group_names ) or ('Compute' in group_names) or ('Networker' in group_names)" - name: Copy exec plugins copy: @@ -256,49 +256,49 @@ with_items: - src: ovs_flows.sh dest: /usr/local/bin/ovs_flows.sh - when: "('controller' in group_names ) or ('compute' in group_names)" + when: "('Controller' in group_names ) or ('Compute' in group_names)" # Rabbitmq monitoring - name: Install pyrabbit easy_install: name: pyrabbit become: 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))" + 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 and inventory_hostname == groups['controller'][0]) or ('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin))" + 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)" + 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)" + 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)" + 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 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 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 @@ -306,25 +306,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 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 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 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 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 @@ -333,7 +333,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)" + when: "('CephStorage' in group_names and ceph_storage_collectd_plugin)" # End CephStorage OSD monitoring - name: Configure collectd.conf diff --git a/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 b/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 index a7f50015d..9eba44c77 100644 --- a/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 +++ b/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 @@ -2,18 +2,18 @@ LoadModule status_module modules/mod_status.so -{% if 'undercloud' in group_names %} +{% if 'Undercloud' in group_names %} Listen {{apache_undercloud_mod_status_port}} {% endif %} -{% if 'controller' in group_names %} +{% if 'Controller' in group_names %} Listen {{apache_controller_mod_status_port}} {% endif %} ExtendedStatus on -{% if 'undercloud' in group_names %} +{% if 'Undercloud' in group_names %} {% endif %} -{% if 'controller' in group_names %} +{% if 'Controller' in group_names %} {% endif %} diff --git a/ansible/install/roles/collectd-openstack/templates/controller.collectd.conf.j2 b/ansible/install/roles/collectd-openstack/templates/controller.collectd.conf.j2 index 424706707..56a40a985 100644 --- a/ansible/install/roles/collectd-openstack/templates/controller.collectd.conf.j2 +++ b/ansible/install/roles/collectd-openstack/templates/controller.collectd.conf.j2 @@ -27,7 +27,7 @@ LoadPlugin write_graphite LoadPlugin apache {% endif %} {% if ceph_controller_collectd_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} LoadPlugin ceph {% endif %} {% endif %} @@ -39,7 +39,7 @@ LoadPlugin conntrack LoadPlugin network {% endif %} {% if keystone_overcloud_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} LoadPlugin dbi {% endif %} {% endif %} @@ -125,7 +125,7 @@ PreCacheChain "PreCache" {% endif %} {% if ceph_controller_collectd_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} {% if ovs_flows_monitoring %} @@ -144,7 +144,7 @@ PreCacheChain "PreCache" {% endif %} {% endif %} {% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} LogTraces true @@ -169,7 +169,7 @@ PreCacheChain "PreCache" {% endif %} {% endif %} {% if keystone_overcloud_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} @@ -191,7 +191,7 @@ PreCacheChain "PreCache" {% else %} -# Token Count plugin installed and enabled on {{groups['controller'][0]}} +# Token Count plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -255,7 +255,7 @@ PreCacheChain "PreCache" {% endif %} {%if gnocchi_status_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" LogTraces true @@ -267,7 +267,7 @@ PreCacheChain "PreCache" {% else %} -# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}} +# Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -432,7 +432,7 @@ PreCacheChain "PreCache" {%if rabbitmq_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" LogTraces true @@ -449,11 +449,11 @@ PreCacheChain "PreCache" {% else %} -# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}} +# Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} {%if swift_stat_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" @@ -471,7 +471,7 @@ PreCacheChain "PreCache" {% else %} -# swift_stat plugin installed and enabled on {{groups['controller'][0]}} +# swift_stat plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -482,17 +482,17 @@ PreCacheChain "PreCache" # ping plugin {% if ping_plugin %} -{% if groups['controller'] | length > 1 %} +{% if groups['Controller'] | length > 1 %} -{% if inventory_hostname == groups['controller'][0] %} - Host "{{groups['controller'][1]}}" - Host "{{groups['controller'][2]}}" -{% elif inventory_hostname == groups['controller'][1] %} - Host "{{groups['controller'][0]}}" - Host "{{groups['controller'][2]}}" -{% elif inventory_hostname == groups['controller'][2] %} - Host "{{groups['controller'][0]}}" - Host "{{groups['controller'][1]}}" +{% if inventory_hostname == groups['Controller'][0] %} + Host "{{groups['Controller'][1]}}" + Host "{{groups['Controller'][2]}}" +{% elif inventory_hostname == groups['Controller'][1] %} + Host "{{groups['Controller'][0]}}" + Host "{{groups['Controller'][2]}}" +{% elif inventory_hostname == groups['Controller'][2] %} + Host "{{groups['Controller'][0]}}" + Host "{{groups['Controller'][1]}}" {% endif %} Interval {{ping_interval}} diff --git a/ansible/install/roles/collectd/tasks/main.yml b/ansible/install/roles/collectd/tasks/main.yml index 2ed24f943..57f33c2d1 100644 --- a/ansible/install/roles/collectd/tasks/main.yml +++ b/ansible/install/roles/collectd/tasks/main.yml @@ -6,7 +6,7 @@ - name: (Undercloud) Get ctlplane ip address shell: ip r | egrep 'br-ctlplane\s*proto kernel' | awk '{print $NF}' register: undercloud_ctlplane_ip_address - when: "'undercloud' in group_names" + when: "'Undercloud' in group_names" - name: Configure mysql for collectd.conf block: @@ -14,13 +14,13 @@ command: hiera -c /etc/puppet/hiera.yaml mysql::server::root_password become: true register: mysql_root_password - when: "'controller' in group_names" + when: "'Controller' in group_names" - name: (Undercloud) Get mysql root password shell: | grep undercloud_mysql_root_password: undercloud-passwords.conf | sed 's/undercloud_mysql_root_password: //g' register: undercloud_mysql_password - when: "'undercloud' in group_names" + when: "'Undercloud' in group_names" - name: Configure rabbitmq monitoring block: @@ -28,25 +28,25 @@ command: hiera -c /etc/puppet/hiera.yaml rabbitmq::default_user become: true register: undercloud_rabbitmq_username - when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" + when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" - name: (Undercloud) Get Rabbitmq password shell: | grep undercloud_rabbit_password /home/stack/undercloud-passwords.conf | sed 's/undercloud_rabbit_password: //g' register: undercloud_rabbitmq_password - when: "('undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" + when: "('Undercloud' in group_names and rabbitmq_undercloud_collectd_plugin)" - 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 and inventory_hostname == groups['controller'][0]" + when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]" - 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 and inventory_hostname == groups['controller'][0]" + when: "'Controller' in group_names and rabbitmq_controller_collectd_plugin and inventory_hostname == groups['Controller'][0]" - name: Check if Container Files Directory exists stat: diff --git a/ansible/install/roles/collectd/templates/00-browbeat_mod_status.conf.j2 b/ansible/install/roles/collectd/templates/00-browbeat_mod_status.conf.j2 index a7f50015d..9eba44c77 100644 --- a/ansible/install/roles/collectd/templates/00-browbeat_mod_status.conf.j2 +++ b/ansible/install/roles/collectd/templates/00-browbeat_mod_status.conf.j2 @@ -2,18 +2,18 @@ LoadModule status_module modules/mod_status.so -{% if 'undercloud' in group_names %} +{% if 'Undercloud' in group_names %} Listen {{apache_undercloud_mod_status_port}} {% endif %} -{% if 'controller' in group_names %} +{% if 'Controller' in group_names %} Listen {{apache_controller_mod_status_port}} {% endif %} ExtendedStatus on -{% if 'undercloud' in group_names %} +{% if 'Undercloud' in group_names %} {% endif %} -{% if 'controller' in group_names %} +{% if 'Controller' in group_names %} {% endif %} diff --git a/ansible/install/roles/collectd/templates/controller.collectd.conf.j2 b/ansible/install/roles/collectd/templates/controller.collectd.conf.j2 index 8c5d41049..5e6817e1b 100644 --- a/ansible/install/roles/collectd/templates/controller.collectd.conf.j2 +++ b/ansible/install/roles/collectd/templates/controller.collectd.conf.j2 @@ -30,7 +30,7 @@ LoadPlugin apache LoadPlugin network {% endif %} {% if ceph_controller_collectd_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} LoadPlugin ceph {% endif %} {% endif %} @@ -39,7 +39,7 @@ LoadPlugin cpu LoadPlugin conntrack {% endif %} {% if keystone_overcloud_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} LoadPlugin dbi {% endif %} {% endif %} @@ -115,7 +115,7 @@ PreCacheChain "PreCache" {% endif %} {% if ceph_controller_collectd_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} LongRunAvgLatency false @@ -128,7 +128,7 @@ PreCacheChain "PreCache" {% endif %} {% endif %} {% if ceph_controller_collectd_radosbench_plugin or ceph_controller_collectd_mon_plugin or ceph_controller_collectd_osd_plugin or ceph_controller_collectd_pg_plugin or ceph_controller_collectd_pool_plugin %} -{% if inventory_hostname == groups['controller'][0] %} +{% if inventory_hostname == groups['Controller'][0] %} LogTraces true @@ -153,7 +153,7 @@ PreCacheChain "PreCache" {% endif %} {% endif %} {% if keystone_overcloud_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} @@ -175,7 +175,7 @@ PreCacheChain "PreCache" {% else %} -# Token Count plugin installed and enabled on {{groups['controller'][0]}} +# Token Count plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -246,7 +246,7 @@ PreCacheChain "PreCache" {% endif %} {%if gnocchi_status_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" LogTraces true @@ -258,7 +258,7 @@ PreCacheChain "PreCache" {% else %} -# Gnocchi status plugin installed and enabled on {{groups['controller'][0]}} +# Gnocchi status plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -425,7 +425,7 @@ PreCacheChain "PreCache" {%if rabbitmq_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" LogTraces true @@ -442,11 +442,11 @@ PreCacheChain "PreCache" {% else %} -# Rabbitmq plugin installed and enabled on {{groups['controller'][0]}} +# Rabbitmq plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} {%if swift_stat_controller_collectd_plugin %} -{%if inventory_hostname == groups['controller'][0] %} +{%if inventory_hostname == groups['Controller'][0] %} ModulePath "/usr/local/bin/" @@ -464,7 +464,7 @@ PreCacheChain "PreCache" {% else %} -# swift_stat plugin installed and enabled on {{groups['controller'][0]}} +# swift_stat plugin installed and enabled on {{groups['Controller'][0]}} {% endif %} {% endif %} @@ -475,17 +475,17 @@ PreCacheChain "PreCache" # ping plugin {% if ping_plugin %} -{% if groups['controller'] | length > 1 %} +{% if groups['Controller'] | length > 1 %} -{% if inventory_hostname == groups['controller'][0] %} - Host "{{groups['controller'][1]}}" - Host "{{groups['controller'][2]}}" -{% elif inventory_hostname == groups['controller'][1] %} - Host "{{groups['controller'][0]}}" - Host "{{groups['controller'][2]}}" -{% elif inventory_hostname == groups['controller'][2] %} - Host "{{groups['controller'][0]}}" - Host "{{groups['controller'][1]}}" +{% if inventory_hostname == groups['Controller'][0] %} + Host "{{groups['Controller'][1]}}" + Host "{{groups['Controller'][2]}}" +{% elif inventory_hostname == groups['Controller'][1] %} + Host "{{groups['Controller'][0]}}" + Host "{{groups['Controller'][2]}}" +{% elif inventory_hostname == groups['Controller'][2] %} + Host "{{groups['Controller'][0]}}" + Host "{{groups['Controller'][1]}}" {% endif %} Interval {{ping_interval}} diff --git a/ansible/install/roles/rally/tasks/main.yml b/ansible/install/roles/rally/tasks/main.yml index 0f211b69a..88c1a53aa 100644 --- a/ansible/install/roles/rally/tasks/main.yml +++ b/ansible/install/roles/rally/tasks/main.yml @@ -56,7 +56,7 @@ dest: "{{home_dir}}/undercloudrc" - name: Get the OS_AUTH_URL value in stackrc - shell: cat undercloudrc | grep OS_AUTH_URL= + shell: cat {{home_dir}}/undercloudrc | grep OS_AUTH_URL= register: os_auth_url - name: Add v3 to OS_AUTH_URL in stackrc diff --git a/ansible/install/rsyslog-logging.yml b/ansible/install/rsyslog-logging.yml index 0b11298d2..3c490078e 100644 --- a/ansible/install/rsyslog-logging.yml +++ b/ansible/install/rsyslog-logging.yml @@ -4,7 +4,7 @@ # -- hosts: undercloud +- hosts: Undercloud remote_user: "{{ local_remote_user }}" vars: - ansible_ssh_pipelining: yes diff --git a/ansible/install/shaker_build.yml b/ansible/install/shaker_build.yml index 830515cc6..b9d322b70 100644 --- a/ansible/install/shaker_build.yml +++ b/ansible/install/shaker_build.yml @@ -3,7 +3,7 @@ # Playbook to build shaker-image # -- hosts: browbeat +- hosts: Browbeat remote_user: "{{ browbeat_user }}" tasks: - name: Check external connectivity diff --git a/ansible/logs/get-overcloud-logs.yml b/ansible/logs/get-overcloud-logs.yml index a7bbe5579..f13fd0bba 100644 --- a/ansible/logs/get-overcloud-logs.yml +++ b/ansible/logs/get-overcloud-logs.yml @@ -1,5 +1,5 @@ --- -- hosts: controller +- hosts: Controller remote_user: "{{host_remote_user}}" vars_files: - ../install/group_vars/all.yml @@ -32,7 +32,7 @@ - common - fetch-logs -- hosts: compute +- hosts: Compute remote_user: "{{host_remote_user}}" vars_files: - ../install/group_vars/all.yml diff --git a/ansible/oooq/baremetal-virt-undercloud-int-browbeat.yml b/ansible/oooq/baremetal-virt-undercloud-int-browbeat.yml index 027bb5275..fa378f34b 100644 --- a/ansible/oooq/baremetal-virt-undercloud-int-browbeat.yml +++ b/ansible/oooq/baremetal-virt-undercloud-int-browbeat.yml @@ -17,6 +17,6 @@ - import_playbook: gather-metadata.yml - name: Run Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/browbeat-run diff --git a/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml b/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml index 3c0aae4ae..436aa794c 100644 --- a/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml +++ b/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml @@ -15,7 +15,7 @@ - import_playbook: gather-metadata.yml - name: Run Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/browbeat-run # - browbeat/browbeat-classify diff --git a/ansible/oooq/baremetal-virt-undercloud-yoda-browbeat.yml b/ansible/oooq/baremetal-virt-undercloud-yoda-browbeat.yml index 647144bde..46cd6fdda 100644 --- a/ansible/oooq/baremetal-virt-undercloud-yoda-browbeat.yml +++ b/ansible/oooq/baremetal-virt-undercloud-yoda-browbeat.yml @@ -3,13 +3,13 @@ - name: Validate IPMI and instackenv.json - hosts: undercloud + hosts: Undercloud gather_facts: yes roles: - validate-ipmi - name: Deploy the undercloud - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - undercloud-deploy @@ -17,55 +17,55 @@ - import_playbook: undercloud-metrics.yml - name: copy over config files - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - overcloud-prep-config - name: Perpare the baremetal overcloud - hosts: undercloud + hosts: Undercloud gather_facts: yes roles: - baremetal-prep-overcloud - name: Prepare overcloud containers - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - { role: overcloud-prep-containers, when: containerized_overcloud|bool } - name: Prepare the overcloud images for deployment - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - overcloud-prep-images - name: Prepare overcloud flavors - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - overcloud-prep-flavors - name: Prepare the undercloud networks for the overcloud deployment - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - overcloud-prep-network - name: Prepare the SSL Configuration for the overcloud deployment - hosts: undercloud + hosts: Undercloud gather_facts: no roles: - { role: overcloud-ssl, when: ssl_overcloud|bool } - name: Configure Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/pre-install-setup - browbeat/oooq-metadata - name: Install Browbeat - hosts: undercloud + hosts: Undercloud vars: - results_in_httpd: false roles: @@ -74,6 +74,6 @@ - browbeat/template-configs - name: Run Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/browbeat-run diff --git a/ansible/oooq/browbeat-minimal.yml b/ansible/oooq/browbeat-minimal.yml index e93a4ff5d..4c479f78d 100644 --- a/ansible/oooq/browbeat-minimal.yml +++ b/ansible/oooq/browbeat-minimal.yml @@ -12,7 +12,7 @@ when: enable_minimal_browbeat|default(false)|bool - name: Run Browbeat - hosts: undercloud + hosts: Undercloud roles: - { role: browbeat/browbeat-run, when: enable_minimal_browbeat|default(false)|bool } diff --git a/ansible/oooq/configure-browbeat.yml b/ansible/oooq/configure-browbeat.yml index 54c937be6..4dc6e2fc1 100644 --- a/ansible/oooq/configure-browbeat.yml +++ b/ansible/oooq/configure-browbeat.yml @@ -1,5 +1,5 @@ --- - name: Configure Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/pre-install-setup diff --git a/ansible/oooq/gather-metadata.yml b/ansible/oooq/gather-metadata.yml index 366d2e498..4afff2154 100644 --- a/ansible/oooq/gather-metadata.yml +++ b/ansible/oooq/gather-metadata.yml @@ -1,12 +1,12 @@ --- -- hosts: compute +- hosts: Compute remote_user: "heat_admin" become: true roles: - browbeat-metadata/common - browbeat-metadata/compute -- hosts: controller +- hosts: Controller remote_user: "heat_admin" become: true roles: @@ -22,7 +22,7 @@ - browbeat-metadata/rabbitmq - browbeat-metadata/glance -- hosts: undercloud +- hosts: Undercloud remote_user: "stack" become: true roles: @@ -31,7 +31,7 @@ - browbeat-metadata/mistral - name: Dump metadata to files - hosts: undercloud + hosts: Undercloud roles: - browbeat-metadata/dump-facts - browbeat/oooq-metadata diff --git a/ansible/oooq/install-browbeat.yml b/ansible/oooq/install-browbeat.yml index dea64ddbf..17fad1233 100644 --- a/ansible/oooq/install-browbeat.yml +++ b/ansible/oooq/install-browbeat.yml @@ -1,6 +1,6 @@ --- - name: Install Browbeat - hosts: undercloud + hosts: Undercloud vars: results_in_httpd: false statsd_host: "{{ graphite_host }}" diff --git a/ansible/oooq/quickstart-browbeat.yml b/ansible/oooq/quickstart-browbeat.yml index 35a24a035..dbe2e4b97 100644 --- a/ansible/oooq/quickstart-browbeat.yml +++ b/ansible/oooq/quickstart-browbeat.yml @@ -13,7 +13,7 @@ - import_playbook: gather-metadata.yml - name: Run Browbeat - hosts: undercloud + hosts: Undercloud roles: - browbeat/browbeat-run - browbeat/browbeat-classify diff --git a/ansible/oooq/roles/oooq-metadata/tasks/main.yml b/ansible/oooq/roles/oooq-metadata/tasks/main.yml index e64458729..4e3b699a8 100644 --- a/ansible/oooq/roles/oooq-metadata/tasks/main.yml +++ b/ansible/oooq/roles/oooq-metadata/tasks/main.yml @@ -10,7 +10,7 @@ shell: docker ps | wc -l register: docker_ps delegate_to: overcloud-controller-0 - when: "'overcloud' in group_names" + when: "'Overcloud' in group_names" ignore_errors: True - name: Set var for container deployment diff --git a/ansible/oooq/undercloud-metrics.yml b/ansible/oooq/undercloud-metrics.yml index 82db69e5c..5f13804de 100644 --- a/ansible/oooq/undercloud-metrics.yml +++ b/ansible/oooq/undercloud-metrics.yml @@ -1,6 +1,6 @@ --- - name: Setup Undercloud Metrics - hosts: undercloud + hosts: Undercloud vars: - config_type: "{{group_names[0]}}" - statsd_host: "{{ graphite_host }}" diff --git a/ansible/tune/tune.yml b/ansible/tune/tune.yml index cb6011749..f37fe9d62 100644 --- a/ansible/tune/tune.yml +++ b/ansible/tune/tune.yml @@ -3,7 +3,7 @@ # Tunes overcloud for browbeat/performance # -- hosts: controller:compute +- hosts: Controller:Compute gather_facts: false remote_user: heat-admin roles: diff --git a/browbeat/prescribe.py b/browbeat/prescribe.py index 1fbf75ab3..5d69d81b4 100644 --- a/browbeat/prescribe.py +++ b/browbeat/prescribe.py @@ -24,7 +24,7 @@ class Metadata(object): def __init__(self): # These are the only groups from the ansible inventory, that we are # Interested in - self._supported_node_types = ['overcloud', 'undercloud'] + self._supported_node_types = ['Overcloud', 'Undercloud'] pass def load_file(self, filename): @@ -83,7 +83,7 @@ class Metadata(object): def get_version_metadata(self, sys_data): version = {} for item, dictionary in six.iteritems(sys_data): - if 'undercloud' in sys_data[item]['group_names']: + if 'Undercloud' in sys_data[item]['group_names']: if 'stockpile_rhosp_version' in dictionary: version['rhosp_version'] = dictionary['stockpile_rhosp_version'] if 'stockpile_rhosp_major' in dictionary: