49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
|
#!/usr/bin/env ansible-playbook
|
||
|
# vim:ft=ansible:
|
||
|
---
|
||
|
- name: configure packages for apt
|
||
|
block:
|
||
|
# Manage archs
|
||
|
- name: enable archs
|
||
|
lineinfile: dest=/var/lib/dpkg/arch line={{ item }} create=yes
|
||
|
loop: "{{ desktop_apt_archs }}"
|
||
|
# Manage keys
|
||
|
- name: enroll keys from keyserver
|
||
|
apt_key: keyserver=keyserver.ubuntu.com id={{ item }}
|
||
|
loop: "{{ desktop_apt_keys_keyserver + desktop_apt_keys_keyserver_extra }}"
|
||
|
- name: enroll keys by url
|
||
|
apt_key: url={{ item }}
|
||
|
loop: "{{ desktop_apt_keys_url + desktop_apt_keys_url_extra }}"
|
||
|
# Manage repos
|
||
|
- name: configure repos
|
||
|
apt_repository: repo={{ item }}
|
||
|
loop: "{{ desktop_apt_repos + desktop_apt_repos_extra }}"
|
||
|
# Manage packages
|
||
|
- name: configure installed packages
|
||
|
apt: name="{{ desktop_apt_packages + desktop_apt_packages_extra }}"
|
||
|
- name: configure out-of-repo packages
|
||
|
apt: deb="{{ item }}"
|
||
|
loop: "{{ desktop_apt_debs + desktop_apt_debs_extra }}"
|
||
|
# Ignoring errors here is important because this task fails on package backdates
|
||
|
ignore_errors: yes
|
||
|
# System76-specific config
|
||
|
# Kinda out of the spirit of the role but whatever
|
||
|
- name: configure system76 machines
|
||
|
block:
|
||
|
- name: configure system76 repo
|
||
|
apt_repository: repo="ppa:system76-dev/stable"
|
||
|
- name: configure system76-specific packages
|
||
|
apt:
|
||
|
name:
|
||
|
- firmware-manager
|
||
|
- kamoso
|
||
|
- system76-acpi-dkms
|
||
|
- system76-dkms
|
||
|
- system76-firmware
|
||
|
- system76-io-dkms
|
||
|
- system76-power
|
||
|
when: ansible_system_vendor == "System76"
|
||
|
when: ansible_pkg_mgr == "apt"
|
||
|
- name: configure pip3 packages
|
||
|
pip: executable=/usr/bin/pip3 state=latest name="{{ desktop_pip3_packages + desktop_pip3_packages_extra }}"
|