Skip to content

Commit

Permalink
modify code as codereview
Browse files Browse the repository at this point in the history
Signed-off-by: ZouYuhua <[email protected]>
  • Loading branch information
ZouYuhua committed Jul 3, 2024
1 parent f9b7c6f commit 58692c6
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions linux/setup/reconfig_existing_guest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,18 @@
vars:
service_name: "packagekit.service"

- name: "Stop and disable 'PackageKit' service"
- name: "Mask 'PackageKit' service"
when:
- service_info
- service_info.state is defined
- service_info.state in ['active', 'running']
block:
- name: "Stop and disable 'PackageKit' service"
ansible.builtin.service:
name: 'packagekit.service'
state: 'stopped'
enabled: false
delegate_to: "{{ vm_guest_ip }}"

- name: "Mask 'PackageKit' service"
ansible.builtin.command: "systemctl mask packagekit"
delegate_to: "{{ vm_guest_ip }}"

- name: "Reboot VM to make sure packagekit.service is disabled and stopped"
include_tasks: ../utils/reboot.yml

- name: "Remove 'PackageKit' package from SLED"
include_tasks: ../utils/install_uninstall_package.yml
vars:
package_list: ["PackageKit"]
package_state: "absent"

- name: "Reconfigure FreeBSD"
when: guest_os_family == "FreeBSD"
block:
Expand Down

0 comments on commit 58692c6

Please sign in to comment.