homeserver/roles/mgrote.apt_install_packages/tasks/main.yml
2021-02-13 16:18:29 +01:00

56 lines
1.4 KiB
YAML

- name: apt update
become: yes
ansible.builtin.package:
update_cache: yes
cache_valid_time: 300
- name: install common-packages
become: yes
ansible.builtin.package:
name: "{{ programs_common }}"
state: present
- name: install extra-packages
become: yes
ansible.builtin.package:
name: "{{ programs_extra }}"
state: present
when: programs_extra is defined
- name: install vm-packages
become: yes
ansible.builtin.package:
name: "{{ programs_only_vms }}"
state: present
when: ansible_virtualization_role == 'guest'
- name: install physical-packages
become: yes
ansible.builtin.package:
name: "{{ programs_only_physical }}"
state: present
when: ansible_virtualization_role != 'guest'
- name: copy hddtemps.sh
become: yes
ansible.builtin.template:
src: "hddtemps.sh"
dest: "/usr/local/bin/hddtemps.sh"
mode: a+x
when: ansible_virtualization_role != 'guest'
- name: copy systemtemps.sh
become: yes
ansible.builtin.template:
src: "systemtemps.sh"
dest: "/usr/local/bin/systemtemps.sh"
mode: a+x
when: ansible_virtualization_role != 'guest'
- name: copy zfs-free.sh
become: yes
ansible.builtin.template:
mode: 0555
src: zfs-free.sh
dest: /usr/local/bin/zfs-free.sh
when: "'proxmox' in group_names"