---
- name: Update apt
  apt:
    update_cache: yes
- name: Upgrade apt
  apt:
    upgrade: full
- name: Install base packages
  apt:
    pkg: ['unzip', 'tar', 'sed', 'curl', 'file', 'vim', 'wget', 'ntp', 'rsync', 'tmux', 'cron', 'fail2ban', 'build-essential', 'htop', 'git', 'apt-transport-https', 'lsb-release', 'ca-certificates']
    state: present
- name: Set correct timezone
  shell: timedatectl set-timezone 'Europe/Paris'
- name: Lower swappiness to 10
  sysctl:
    name: vm.swappiness
    value: '10'
    state: present

---
- name: Refresh apt keys
  shell: apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
  become: yes
  become_user: root
- name: Update apt
  apt:
    update_cache: yes
- name: Upgrade apt
  apt:
    upgrade: full
- name: Install base packages
  apt:
    pkg: ['unzip', 'tar', 'sed', 'curl', 'file', 'vim', 'wget', 'ntp', 'rsync', 'tmux', 'cron', 'fail2ban', 'build-essential', 'htop', 'git', 'apt-transport-https', 'lsb-release', 'ca-certificates']
    state: present
- name: Set correct timezone
  shell: timedatectl set-timezone 'Europe/Paris'
- name: Lower swappiness to 10
  sysctl:
    name: vm.swappiness
    value: '10'
    state: present

Add key refreshing in base role
Add key refreshing in base role