Archived
1
0
Fork 0

Fix ansible playbooks

This commit is contained in:
J. Elfring (g) 2021-02-22 21:11:29 +01:00
parent ec27fbf5de
commit 55a1d217bc
4 changed files with 161 additions and 155 deletions

View file

@ -6,10 +6,7 @@
- name: "Install base packages" - name: "Install base packages"
package: package:
name: '{{ item }}' name:
state: present
update_cache: True
with_items:
- fortune-mod - fortune-mod
- git - git
- intel-ucode - intel-ucode
@ -18,9 +15,18 @@
- rsync - rsync
- sudo - sudo
- vim - vim
state: present
update_cache: true
- name: "Remove unwanted packages"
package:
name:
- puppet
state: present
update_cache: false
- name: "Console settings" - name: "Console settings"
when: "'gpd' not in inventory_hostname" when: "'gpd' not in ansible_hostname"
copy: copy:
dest: /etc/vconsole.conf dest: /etc/vconsole.conf
owner: root owner: root
@ -30,7 +36,7 @@
KEYMAP=de-latin1-nodeadkeys KEYMAP=de-latin1-nodeadkeys
- name: "Console settings (GPD Pocket 2)" - name: "Console settings (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/vconsole.conf dest: /etc/vconsole.conf
owner: root owner: root

View file

@ -6,10 +6,7 @@
- name: "Install workstation packages" - name: "Install workstation packages"
package: package:
name: '{{ item }}' name:
state: present
update_cache: True
with_items:
- acpi - acpi
- alacritty - alacritty
- arandr - arandr
@ -116,6 +113,8 @@
- xterm - xterm
- zathura - zathura
- zathura-pdf-mupdf - zathura-pdf-mupdf
state: present
update_cache: True
- name: "Remove unwanted packages" - name: "Remove unwanted packages"
package: package:
@ -205,7 +204,7 @@
## X11 ## X11
- name: "X11: Keyboard" - name: "X11: Keyboard"
when: "'gpd' not in inventory_hostname" when: "'gpd' not in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf
@ -214,7 +213,7 @@
mode: 0644 mode: 0644
- name: "X11: Touchpad" - name: "X11: Touchpad"
when: "'gpd' not in inventory_hostname" when: "'gpd' not in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/50-touchpad.conf dest: /etc/X11/xorg.conf.d/50-touchpad.conf
src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf
@ -223,7 +222,7 @@
mode: 0644 mode: 0644
- name: "X11: Keyboard (GPD Pocket 2)" - name: "X11: Keyboard (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2 src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2
@ -232,37 +231,37 @@
mode: 0644 mode: 0644
- name: "X11: Intel Graphics (GPD Pocket 2)" - name: "X11: Intel Graphics (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/20-intel.conf dest: /etc/X11/xorg.conf.d/20-intel.conf
src: ./lib/etc/X11/xorg.conf.d/20-intel.conf src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: "X11: Monitor (GPD Pocket 2)" - name: "X11: Monitor (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/30-display.conf dest: /etc/X11/xorg.conf.d/30-display.conf
src: ./lib/etc/X11/xorg.conf.d/30-display.conf src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: "X11: Touchscreen (GPD Pocket 2)" - name: "X11: Touchscreen (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/X11/xorg.conf.d/99-touchscreen.conf dest: /etc/X11/xorg.conf.d/99-touchscreen.conf
src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: "X11: Xresources (GPD Pocket 2)" - name: "X11: Xresources (GPD Pocket 2)"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/X11/Xresources dest: /etc/X11/Xresources
src: ./lib/etc/X11/resources src: ./lib/etc/X11/Xresources.gpdp2
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
@ -296,7 +295,7 @@
## GPD Pocket Specials ## GPD Pocket Specials
- name: "GPD fan module" - name: "GPD fan module"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/modules-load.d/gpd-pocket-fan.conf dest: /etc/modules-load.d/gpd-pocket-fan.conf
owner: root owner: root
@ -306,7 +305,7 @@
gpd-pocket-fan gpd-pocket-fan
- name: "GPD fan module config" - name: "GPD fan module config"
when: "'gpd' in inventory_hostname" when: "'gpd' in ansible_hostname"
copy: copy:
dest: /etc/modprobe.d/gpd-pocket-fan.conf dest: /etc/modprobe.d/gpd-pocket-fan.conf
owner: root owner: root

View file

@ -13,11 +13,10 @@
- name: Install build tools - name: Install build tools
package: package:
name: '{{ item }}' name:
- base-devel
state: present state: present
update_cache: True update_cache: True
with_items:
- base-devel
- name: "Gather package facts" - name: "Gather package facts"
package_facts: package_facts:
@ -34,21 +33,3 @@
become: yes become: yes
become_user: aur_builder become_user: aur_builder
script: ./lib/installFromAur.sh ansible-aur-git script: ./lib/installFromAur.sh ansible-aur-git
- name: Install AUR packages
become: yes
become_user: aur_builder
aur:
name: '{{ item }}'
with_items:
- free42
- insync
- c-lolcat
- python-i3-py
- ttf-unifont
- ttf-symbola

View file

@ -0,0 +1,20 @@
- name: "Install AUR helper and packages"
hosts: localhost
connection: local
tasks:
- name: Install AUR packages
become: yes
become_user: aur_builder
aur:
name:
- free42
- insync
- c-lolcat
- python-i3-py
- ttf-unifont
- ttf-symbola