Intial Commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
---
|
||||
- name: Install various utilities on Debian/Ubuntu and Red Hat systems
|
||||
hosts: Docker
|
||||
become: true
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: Update apt cache (Debian/Ubuntu)
|
||||
apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600 # Cache valid for 1 hour
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Install packages for Debian/Ubuntu
|
||||
apt:
|
||||
name:
|
||||
- build-essential
|
||||
- git
|
||||
- curl
|
||||
- wget
|
||||
- htop
|
||||
- tar
|
||||
- net-tools
|
||||
- unzip
|
||||
- python3
|
||||
- restic
|
||||
state: present
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Update Debian-based Systems
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: dist
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Install EPEL Repository (Red Hat/CentOS)
|
||||
yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Install packages for RedHat/CentOS
|
||||
yum:
|
||||
name:
|
||||
- "@Development Tools"
|
||||
- git
|
||||
- vim
|
||||
- curl
|
||||
- wget
|
||||
- htop
|
||||
- tar
|
||||
- python3
|
||||
- net-tools
|
||||
- unzip
|
||||
- restic
|
||||
state: present
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Update RHEL-based Systems
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Update Restic Binaries
|
||||
ansible.builtin.command:
|
||||
cmd: restic self-update
|
||||
|
||||
# This will run after the previous play is completed
|
||||
- import_playbook: install_docker.yml
|
||||
Reference in New Issue
Block a user