We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b0a83c commit a6344feCopy full SHA for a6344fe
1 file changed
ansible/playbooks/fully-patch-system.yaml
@@ -7,6 +7,31 @@
7
use_reboottimeout: 600
8
9
tasks:
10
+ - name: Check if Zypper lock file exists
11
+ stat:
12
+ path: /var/run/zypp.pid
13
+ register: lockfile_check
14
+ become: yes
15
+
16
+ - name: Get PID from Zypper lock file
17
+ slurp:
18
+ src: /var/run/zypp.pid
19
+ register: pid_content
20
21
+ when: lockfile_check.stat.exists
22
23
+ - name: Set PID variable
24
+ set_fact:
25
+ zypper_pid: "{{ (pid_content['content'] | b64decode).strip() }}"
26
27
28
+ - name: Check if process with PID is running
29
+ shell: ps -p {{ zypper_pid }} -o comm=
30
+ register: process_check
31
+ failed_when: false
32
+ changed_when: false
33
34
35
# Fully patch system
36
- name: Apply all available patches
37
community.general.zypper:
0 commit comments