1
0
Fork 0
dotfiles2000/system/arch/baseconfig.yaml
J. Elfring (g) 2e288fbf8c Install keyd for gpd pocket
and create umlaut shortcuts
2024-11-08 14:50:56 +01:00

136 lines
3.2 KiB
YAML

- name: "Base config for all arch hosts"
hosts: localhost
connection: local
tasks:
- name: "Update pacman cache"
community.general.pacman:
update_cache: True
- name: "Install base packages"
ansible.builtin.package:
name: '{{ item }}'
state: present
update_cache: False
with_items:
- fortune-mod
- git
- make
- openssh
- pass
- pass-otp
- rsync
- sudo
- vim
- name: "Remove unwanted packages"
ansible.builtin.package:
name:
- puppet
state: absent
update_cache: false
- name: "Console settings"
when: "'gpd' not in ansible_hostname"
ansible.builtin.copy:
dest: /etc/vconsole.conf
owner: root
group: root
mode: 0644
content: |
KEYMAP=de-latin1-nodeadkeys
- name: "Localization: Set papersize"
ansible.builtin.copy:
dest: /etc/papersize
owner: root
group: root
mode: 0644
content: |
a4
- name: "Localization: Set timezone"
ansible.builtin.file:
dest: /etc/localtime
src: /usr/share/zoneinfo/Europe/Berlin
state: link
- name: "Localization: locale.conf"
ansible.builtin.copy:
dest: /etc/locale.conf"
owner: root
group: root
mode: 0644
content: |
##### THIS IS MANAGED BY ANSIBLE #####
LANG=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_COLLATE=C
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
- name: "Localization: locale.gen"
register: locale_gen
ansible.builtin.copy:
dest: /etc/locale.gen
owner: root
group: root
mode: 0644
content: |
##### THIS IS MANAGED BY ANSIBLE #####
de_DE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
- name: "Localization: Regenerate locale"
when: locale_gen.changed
ansible.builtin.command: "/usr/bin/locale-gen"
- name: "Use systemd-timesyncd"
ansible.builtin.service:
name: systemd-timesyncd
state: started
enabled: yes
- name: "Sudo: config file"
ansible.builtin.copy:
dest: /etc/sudoers
src: ./lib/etc/sudoers
owner: root
group: root
mode: 0440
- name: "Sudo: Create groups"
ansible.builtin.group:
name: '{{ item }}'
state: present
system: true
with_items:
- wheel
- sudo
- name: "Pacman configuration"
when: "'arm' not in ansible_machine"
ansible.builtin.copy:
dest: /etc/pacman.conf
src: ./lib/etc/pacman.conf
owner: root
group: root
mode: 0644
- name: "Pacman configuration (ARM)"
when: "'arm' in ansible_machine"
ansible.builtin.copy:
dest: /etc/pacman.conf
src: ./lib/etc/pacman.conf.arm
owner: root
group: root
mode: 0644