Skip to main content

Ansible Installation For Daily Debian Package Updates

utilities system configuration sysadmin


Performed on Debian 12 (bookworm)

wget -O- "" | sudo gpg --dearmour -o /usr/share/keyrings/ansible-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/ansible.list
sudo apt update && sudo apt install ansible
which ansible
ansible --version

Create inventory

cd /etc/ansible
sudo nano hosts
ansible-inventory --list -y

Test that hosts are reachable

# Confirm fingerprint of each SSH connection when connecting first time
ansible all -m ping 
# Do ssh-copy-id on other servers that failed auto-login check
# Test individual host
ansible -m ping

Create playbook for updating packages

- hosts: apt
  become: true
  - name: Update and upgrade apt packages
      name: "*"
      state: latest
      #upgrade: yes
      update_cache: yes
      cache_valid_time: 86400 #One day
      autoremove: yes
      purge: true

Links #


Pdfcpu Commands For Manipulating Pdf Files
utilities pdf
Install # Download and extract pdfcpu.
Print CSV Files To PDF With Weasyprint
utilities development pdf python css
CSV file converted to PDF, with variable column widths and footers Printing a CSV file as a nicely formatted table is easy if you import it first into a spreadsheet like Microsoft Excel or LibreOffice Calc.
Beyond Passwords: 5 Ways To Prevent Unauthorized Logins
security ssh sysadmin
Hard-to-guess passwords are important to securing your network from intrusion.