File tree Expand file tree Collapse file tree 2 files changed +44
-11
lines changed
Expand file tree Collapse file tree 2 files changed +44
-11
lines changed Original file line number Diff line number Diff line change 88 upgrade : safe
99 autoremove : true
1010
11+ - name : Ensure needrestart is installed
12+ become : true
13+ ansible.builtin.apt :
14+ name : needrestart
15+ state : present
16+ update_cache : yes
17+
18+ - name : Check if reboot is required
19+ shell :
20+ cmd : needrestart -b | awk '/NEEDRESTART-KEXP|NEEDRESTART-KCUR/ {print $2}'
21+ become : true
22+ register : reboot_required_file
23+
24+ - name : Reboot if required
25+ reboot :
26+ msg : " Rebooting due to system updates"
27+ connect_timeout : 5
28+ reboot_timeout : 360
29+ pre_reboot_delay : 0
30+ post_reboot_delay : 30
31+ test_command : uptime
32+ become : true
33+ when : reboot_required_file.stdout_lines[0] != reboot_required_file.stdout_lines[1]
34+
1135 - name : Check if reboot is required
1236 stat :
1337 path : /var/run/reboot-required
3963 version : master
4064 update : yes
4165 clone : yes
42- register : git_checkout_warp
43-
4466
4567 - name : Stop Docker containers
4668 community.docker.docker_compose_v2 :
4769 project_src : /home/freddy/esp32-remote-access/docker
4870 state : stopped
49- when : git_checkout.changed
5071
5172 - name : Pull and rerun docker images
5273 community.docker.docker_compose_v2 :
5374 build : always
5475 pull : always
5576 project_src : /home/freddy/esp32-remote-access/docker
56- when : git_checkout.changed
77+
5778
5879 - name : Show current tag
5980 ansible.builtin.debug :
Original file line number Diff line number Diff line change 88 upgrade : safe
99 autoremove : true
1010
11+ - name : Ensure needrestart is installed
12+ become : true
13+ ansible.builtin.apt :
14+ name : needrestart
15+ state : present
16+ update_cache : yes
17+
1118 - name : Check if reboot is required
12- stat :
13- path : /var/run/reboot-required
19+ shell :
20+ cmd : needrestart -b | awk '/NEEDRESTART-KEXP|NEEDRESTART-KCUR/ {print $2}'
21+ become : true
1422 register : reboot_required_file
1523
1624 - name : Reboot if required
1725 reboot :
18- when : reboot_required_file.stat.exists
26+ msg : " Rebooting due to system updates"
27+ connect_timeout : 5
28+ reboot_timeout : 360
29+ pre_reboot_delay : 0
30+ post_reboot_delay : 30
31+ test_command : uptime
32+ become : true
33+ when : reboot_required_file.stdout_lines[0] != reboot_required_file.stdout_lines[1]
1934
2035 - name : Checkout remote access git
2136 ansible.builtin.git :
2237 repo : https://github.com/Tinkerforge/esp32-remote-access.git
2338 dest : /home/freddy/esp32-remote-access
24- version : main
39+ version : v1.2.44
2540 update : yes
2641 clone : yes
2742 register : git_checkout
4156 version : master
4257 update : yes
4358 clone : yes
44- register : git_checkout_warp
4559
4660 - name : Stop Docker containers
4761 community.docker.docker_compose_v2 :
4862 project_src : /home/freddy/esp32-remote-access/docker
4963 state : stopped
50- when : git_checkout.changed
5164
5265 - name : Pull and rerun docker images
5366 community.docker.docker_compose_v2 :
5467 build : always
5568 pull : always
5669 project_src : /home/freddy/esp32-remote-access/docker
57- when : git_checkout.changed
5870
5971 - name : Show current tag
6072 ansible.builtin.debug :
You can’t perform that action at this time.
0 commit comments