Skip to content

Commit

Permalink
Merge pull request #816 from rabi/mask
Browse files Browse the repository at this point in the history
Mask tripleo services after removing unit files
  • Loading branch information
openshift-merge-bot[bot] authored Nov 15, 2024
2 parents c67d385 + f130265 commit b6ad820
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/edpm_tripleo_cleanup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ edpm_service_removal_skip_list:
- tripleo_swift_object_replicator.service
- tripleo_swift_object_server.service
- tripleo_swift_object_updater.service
- tripleo-container-shutdown.service
21 changes: 20 additions & 1 deletion roles/edpm_tripleo_cleanup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
name: "{{ item }}"
state: stopped
enabled: false
masked: true
register: result
loop: "{{ tripleo_services }}"
failed_when: false
Expand All @@ -74,6 +73,26 @@
loop_var: path
when: edpm_remove_tripleo_unit_files

- name: Mask tripleo services to make them unusable
tags:
- adoption
become: true
ansible.builtin.systemd_service:
name: "{{ item }}"
masked: true
register: result_mask
loop: "{{ tripleo_services }}"
failed_when: false

- name: Check for errors
ansible.builtin.fail:
msg: "Attempt to mask service {{ item.item }} failed with {{ item.msg }}"
loop: "{{ result_mask.results }}"
when: >
('msg' in item) and
(item.msg != '') and
("Could not find the requested service" not in item.msg)
- name: Adopt (stop tracking) certs from tripleo
tags:
- adoption
Expand Down

0 comments on commit b6ad820

Please sign in to comment.