From 554bf8a7e6bd56a4f7451f5ae589698438459255 Mon Sep 17 00:00:00 2001 From: Zakaria Date: Fri, 9 Aug 2024 04:39:38 +0000 Subject: [PATCH] commit all --- installVIM.yml | 15 +++++++++++++++ installcurl.yml | 15 +++++++++++++++ update_machines.yml | 17 +++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 installVIM.yml create mode 100644 installcurl.yml create mode 100644 update_machines.yml diff --git a/installVIM.yml b/installVIM.yml new file mode 100644 index 0000000..0b59641 --- /dev/null +++ b/installVIM.yml @@ -0,0 +1,15 @@ +--- +- 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' diff --git a/installcurl.yml b/installcurl.yml new file mode 100644 index 0000000..caeedd5 --- /dev/null +++ b/installcurl.yml @@ -0,0 +1,15 @@ +--- +- hosts: all + become: yes + tasks: + - name: Install curl on Ubuntu servers + package: + name: curl + state: present + when: ansible_facts['os_family'] == 'Debian' + + - name: Install curl on Fedora servers + dnf: + name: curl + state: present + when: ansible_facts['distribution'] == 'Fedora' diff --git a/update_machines.yml b/update_machines.yml new file mode 100644 index 0000000..ce64c06 --- /dev/null +++ b/update_machines.yml @@ -0,0 +1,17 @@ +--- +- hosts: all + become: true + tasks: + - name: Update all servers + become: true + 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'