endeavour.yaml
· 2.7 KiB · YAML
Raw
- hosts: localhost
become: True
gather_facts: True
vars:
user: f
tasks:
# Config stuff, some apply once, some more, will probably break when we keep rolling
- name: Paralell downloads increase from standard (this will only work once, fix later)
ansible.builtin.replace:
path: /etc/pacman.conf
# regexp: '^#?ParallelDownloads = 5$'
regexp: '^#?ParallelDownloads = \d+$'
replace: 'ParallelDownloads = 33'
- name: Create /etc/NetworkManager/conf.d/20-connectivity.conf with connectivity disabled
ansible.builtin.file:
path: /etc/NetworkManager/conf.d
state: directory
mode: '0755'
- name: Ensure MAKEFLAGS is set to use all available cores
lineinfile:
path: /etc/makepkg.conf
regexp: '^MAKEFLAGS='
line: 'MAKEFLAGS="-j$(nproc)"'
state: present
- name: Ensure COMPRESS is set to gzip
lineinfile:
path: /etc/makepkg.conf
regexp: '^COMPRESS='
line: 'COMPRESS="gzip"'
state: present
- name: Ensure PKGEXT is set to .pkg.tar.gz
lineinfile:
path: /etc/makepkg.conf
regexp: '^PKGEXT='
line: 'PKGEXT=".pkg.tar.gz"'
state: present
- name: Ensure yay config directory exists
file:
path: /home/{{ user }}/.config/yay
state: directory
mode: '0755'
owner: "{{ user }}" # Ensure ownership
group: "{{ user }}" # Ensure group ownership
- name: Ensure yay config file exists
copy:
dest: /home/{{ user }}/.config/yay/config.json
content: |
{
"sudoloop": true
}
mode: '0644'
owner: "{{ user }}" # Ensure ownership
group: "{{ user }}" # Ensure group ownership
- name: Update yay config to add sudoloop
lineinfile:
path: /home/{{ user }}/.config/yay/config.json
regexp: '"sudoloop":'
line: '"sudoloop": true'
state: present
owner: "{{ user }}" # Ensure ownership
group: "{{ user }}" # Ensure group ownership # FYI
# /etc/NetworkManager/conf.d/20-connectivity.conf
# overwrites
# /usr/lib/NetworkManager/conf.d/20-connectivity.conf
# Both is probably maybe being overwritten sometimes by pacman
- name: Disable NetworkManager connectivity checks
ansible.builtin.copy:
dest: /etc/NetworkManager/conf.d/20-connectivity.conf
content: |
[connectivity]
uri=http://ping.archlinux.org/nm-check.txt
enabled=false
mode: '0644'
- name: Clone GitHub Copilot Vim repository ({{ ansible_date_time.iso8601 }})
ansible.builtin.git:
repo: https://github.com/github/copilot.vim.git
dest: /home/{{ user }}/.config/nvim/pack/github/start/copilot.vim
update: true
# :Copilot status in vim etc
1 | - hosts: localhost |
2 | become: True |
3 | gather_facts: True |
4 | vars: |
5 | user: f |
6 | tasks: |
7 | # Config stuff, some apply once, some more, will probably break when we keep rolling |
8 | - name: Paralell downloads increase from standard (this will only work once, fix later) |
9 | ansible.builtin.replace: |
10 | path: /etc/pacman.conf |
11 | # regexp: '^#?ParallelDownloads = 5$' |
12 | regexp: '^#?ParallelDownloads = \d+$' |
13 | replace: 'ParallelDownloads = 33' |
14 | - name: Create /etc/NetworkManager/conf.d/20-connectivity.conf with connectivity disabled |
15 | ansible.builtin.file: |
16 | path: /etc/NetworkManager/conf.d |
17 | state: directory |
18 | mode: '0755' |
19 | |
20 | - name: Ensure MAKEFLAGS is set to use all available cores |
21 | lineinfile: |
22 | path: /etc/makepkg.conf |
23 | regexp: '^MAKEFLAGS=' |
24 | line: 'MAKEFLAGS="-j$(nproc)"' |
25 | state: present |
26 | |
27 | - name: Ensure COMPRESS is set to gzip |
28 | lineinfile: |
29 | path: /etc/makepkg.conf |
30 | regexp: '^COMPRESS=' |
31 | line: 'COMPRESS="gzip"' |
32 | state: present |
33 | - name: Ensure PKGEXT is set to .pkg.tar.gz |
34 | lineinfile: |
35 | path: /etc/makepkg.conf |
36 | regexp: '^PKGEXT=' |
37 | line: 'PKGEXT=".pkg.tar.gz"' |
38 | state: present |
39 | |
40 | - name: Ensure yay config directory exists |
41 | file: |
42 | path: /home/{{ user }}/.config/yay |
43 | state: directory |
44 | mode: '0755' |
45 | owner: "{{ user }}" # Ensure ownership |
46 | group: "{{ user }}" # Ensure group ownership |
47 | |
48 | - name: Ensure yay config file exists |
49 | copy: |
50 | dest: /home/{{ user }}/.config/yay/config.json |
51 | content: | |
52 | { |
53 | "sudoloop": true |
54 | } |
55 | mode: '0644' |
56 | owner: "{{ user }}" # Ensure ownership |
57 | group: "{{ user }}" # Ensure group ownership |
58 | |
59 | - name: Update yay config to add sudoloop |
60 | lineinfile: |
61 | path: /home/{{ user }}/.config/yay/config.json |
62 | regexp: '"sudoloop":' |
63 | line: '"sudoloop": true' |
64 | state: present |
65 | owner: "{{ user }}" # Ensure ownership |
66 | group: "{{ user }}" # Ensure group ownership # FYI |
67 | # /etc/NetworkManager/conf.d/20-connectivity.conf |
68 | # overwrites |
69 | # /usr/lib/NetworkManager/conf.d/20-connectivity.conf |
70 | # Both is probably maybe being overwritten sometimes by pacman |
71 | - name: Disable NetworkManager connectivity checks |
72 | ansible.builtin.copy: |
73 | dest: /etc/NetworkManager/conf.d/20-connectivity.conf |
74 | content: | |
75 | [connectivity] |
76 | uri=http://ping.archlinux.org/nm-check.txt |
77 | enabled=false |
78 | mode: '0644' |
79 | |
80 | - name: Clone GitHub Copilot Vim repository ({{ ansible_date_time.iso8601 }}) |
81 | ansible.builtin.git: |
82 | repo: https://github.com/github/copilot.vim.git |
83 | dest: /home/{{ user }}/.config/nvim/pack/github/start/copilot.vim |
84 | update: true |
85 | # :Copilot status in vim etc |
86 |