Skip to content
Snippets Groups Projects
Select Git revision
  • f6512fb61a1ce9b86bc3086d09b0be6196cc253d
  • master default protected
2 results

pre-commit

Blame
  • install_packages.yml 3.19 KiB
    ---
    # Äquivalent von apt-get update
    - name: apt-get update
      ansible.builtin.apt:
        update_cache: true
      when: ansible_os_family == "Debian"
    
    # Äquivalent von yum update
    - name: update packages (RedHat)
      block:
        - name: yum update
          ansible.builtin.yum:
            update_cache: true
            name: '*'
            state: present
        - name: yum autoremove
          ansible.builtin.yum:
            autoremove: true
      when: ansible_os_family == "RedHat"
    
    - name: uninstall packages
      ansible.builtin.apt:
        name: [
          'atop',
          'byobu',
        ]
        state: absent
        purge: true
      when: ansible_os_family == "Debian"
      environment:
        NEEDRESTART_MODE: "automatically"
    
    # Installation allgemeiner Pakete
    # byobu (contains tmux), e2fsprogs (contains e2label etc.), net-tools (contains arp, ifconfig, netstat, rarp, nameif, route etc.), sysstat (contains sar, iostat, mpstat, pidstat, sadf, nfsiostat, cifsiostat), util-linux (contains blkid etc.)
    - name: Installation allgemeiner Pakete
      ansible.builtin.package:
        name: [
          'bmon',
          'cowsay',
          'curl',
          'e2fsprogs',
          'ethtool',
          'figlet',
          'htop',
          'iftop',
          'iotop',
          'libuser',
          'logrotate',
          'mc',
          'mtr',
          'multitail',
          'ncdu',
          'nethogs',
          'net-tools',
          'nload',
          'nmon',
          'ntp',
          'parted',
          'psmisc',
          'pv',
          'sudo',
          'sysstat',
          'tmux',
          'tree',
          'unzip',
          'util-linux',
        ]
        state: present
      environment:
        NEEDRESTART_MODE: "automatically"