anotherCommit

This commit is contained in:
Zakaria 2024-08-09 05:12:50 +00:00
parent 554bf8a7e6
commit 4a01e43a96
3 changed files with 16 additions and 22 deletions

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'

View File

@ -7,11 +7,20 @@
apt:
upgrade: dist
update_cache: yes
when: ansible_facts['distribution'] == 'Ubuntu'
- name: Install Neofetch
become: true
ansible.builtin.dnf:
name: neofetch
state: present
when: ansible_facts['distribution'] == 'Fedora'
- name: Make sure Zypper is installed
ansible.builtin.apt:
name: "zypper"
state: installed
- 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"