diff --git a/README.md b/README.md index 0905a81..fa4585d 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ None. ## Role Variables -There is one variable, which is the list of packages to install. +Extra packages can be installed by using the custom list: ```yaml -sysadmin_packages: [] +sysadmin_packages_custom: [] ``` diff --git a/defaults/main.yml b/defaults/main.yml index 0a596ea..b9afb63 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,3 @@ --- -sysadmin_packages: [] \ No newline at end of file +sysadmin_packages: [] +sysadmin_packages_custom: [] \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 94f7b33..e484b1c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,6 +12,12 @@ state: present name: "{{ sysadmin_packages }}" +- name: Ensure custom sysadmin utility packages are installed. + ansible.builtin.package: + state: present + name: "{{ sysadmin_packages_custom }}" + when: sysadmin_packages_custom | length > 0 + - name: Generate ed25519 SSH host key ansible.builtin.command: cmd: ssh-keygen -A diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index d3ec41f..1e75e26 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -49,6 +49,14 @@ # reboot_timeout: 3600 # when: kernel_version is changed +- name: Update sources.list to select a fast mirror on Ubuntu + ansible.builtin.replace: + path: /etc/apt/sources.list + regexp: 'http://.*archive.ubuntu.com/ubuntu' + replace: 'mirror://mirrors.ubuntu.com/mirrors.txt' + when: ansible_distribution == 'Ubuntu' + + - name: Update all packages to their latest version ansible.builtin.apt: name: '*' diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml new file mode 100644 index 0000000..8136c03 --- /dev/null +++ b/vars/Archlinux.yml @@ -0,0 +1,34 @@ +--- +sysadmin_packages: + - bash-completion + - curl + - dnsutils + - doas + - dosfstools + - ffmpeg + - file + - git + - gnupg + - htop + - jq + - mediainfo + - mtr + - net-tools + - netcat + - nginx + - p7zip + - parted + - pass + - psmisc + - rsync + - smartmontools + - tcpdump + - tmux + - tree + - unzip + - vi + - vim + - vim + - wget + - which + - whois \ No newline at end of file