| # Copyright (c) 2023 VEXXHOST, Inc. |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| # not use this file except in compliance with the License. You may obtain |
| # a copy of the License at |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations |
| - name: Install package for "community.general.pids" |
| # NOTE(mnaser): These are all processes that we do not currently have a way to |
| # safely evacuate *yet*. We should remove these as we add ways |
| - name: Get process IDs for critical services |
| - name: Assert that none of these processes are running |
| - item.pids | length == 0 |
| The following processes are running: {{ item.item }} ({{ item.pids | join(', ') }}) |
| loop: "{{ _reboots_pids.results }}" |
| - name: Create a silence and reboot the host |
| # TODO(mnaser): Create a silence inside AlertManager |
| # TODO(mnaser): Remove the silence from AlertManager |