anotherCommit

This commit is contained in:
2024-08-09 05:12:50 +00:00
parent 554bf8a7e6
commit 4a01e43a96
3 changed files with 16 additions and 22 deletions
-15
View File
@@ -1,15 +0,0 @@
---
- hosts: all
become: yes
tasks:
- name: Install Vim on Ubuntu servers
package:
name: vim
state: present
when: ansible_facts['os_family'] == 'Debian'
- name: Install Vim on Fedora servers
dnf:
name: vim
state: present
when: ansible_facts['distribution'] == 'Fedora'
+16 -7
View File
@@ -7,11 +7,20 @@
apt: apt:
upgrade: dist upgrade: dist
update_cache: yes update_cache: yes
when: ansible_facts['distribution'] == 'Ubuntu'
- name: Install Neofetch - name: Make sure Zypper is installed
become: true ansible.builtin.apt:
ansible.builtin.dnf: name: "zypper"
name: neofetch state: installed
state: present
when: ansible_facts['distribution'] == 'Fedora' - name: See if pct needs a reboot
ansible.builtin.shell: "needs-restarting -r > /dev/null; echo $?"
register: needsRestarting
- name: debug
ansible.builtin.apt:
msg: "{{ needsRestarting }}"
- name: Reboot the Container
ansible.builtin.reboot:
reboot_timeout: 600
when: needsRestarting.stdout == "1"