Compare commits

...

18 Commits

Author SHA1 Message Date
24eb0994eb Merge branch 'master' into updates 2021-11-13 00:28:48 +01:00
cb0901739c fixed config file permissions 2021-11-13 00:27:52 +01:00
a6a72205e4 Update 'playbook_sway.yml' 2021-11-12 23:02:19 +01:00
714cb2abec Not needed 2021-11-12 23:01:57 +01:00
b40bd3c2e0 Update 'playbook_sway.yml' 2021-11-12 23:01:25 +01:00
ef083c0f34 Dont install packages if they already exist 2021-11-12 23:00:35 +01:00
cce009b5f0 added localhost to playbook 2021-11-12 22:59:42 +01:00
f3d008f19c added sway stuff in readme@ 2021-11-12 22:55:52 +01:00
7f85022b43 Added install stuff for sway 2021-11-12 22:54:28 +01:00
Tobias Maier
f063df241f added git config system-wide so its not limited to the root user 2021-11-11 11:39:38 +01:00
Tobias Maier
c311f40249 removed temporary file which was just for testing and commited to git on accident 2021-11-11 11:36:36 +01:00
7a518e0482 Add ssh-rsa to ssh config as this seems to be disabled by default 2021-11-11 11:33:27 +01:00
0601ad4d0f Update 'README.md' 2021-10-23 19:12:33 +02:00
128a8579f0 Update 'playbook.yml' 2021-10-23 18:56:37 +02:00
Tobias Maier
16ada0d19e added plugins 2021-10-23 18:31:31 +02:00
Tobias Maier
3fe553675b added dotfiles 2021-10-23 17:36:18 +02:00
Tobias Maier
0aa8212771 nano 2021-10-23 12:12:55 +02:00
Tobias Maier
edb78415fe update 2021-10-23 12:11:23 +02:00
8 changed files with 281 additions and 53 deletions

View File

@@ -1,7 +1,16 @@
# setup_ansible_playbooks
To Install:
## WSL
To Install wsl System:
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install.sh | bash`
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install_wsl.sh | bash`
https://github.com/powerline/fonts
https://github.com/powerline/fonts
arch config --default-user tobi
## SWAY
To Install sway System:
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install_sway.sh | bash`

5
install_sway.sh Normal file
View File

@@ -0,0 +1,5 @@
pacman -Syu --noconfirm --needed git ansible
git clone https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git install
cd install
ansible-galaxy install -r requirements.yml
ansible-playbook playbook_sway.yml

View File

@@ -4,4 +4,4 @@ pacman -Syu --noconfirm git ansible
git clone https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git install
cd install
ansible-galaxy install -r requirements.yml
ansible-playbook playbook.yml
ansible-playbook playbook_wsl.yml

View File

@@ -1,45 +0,0 @@
---
- name: Initial installation of WSL arch
hosts: localhost
pre_tasks:
- name: Run the equivalent of "pacman -Syu" as a separate step
community.general.pacman:
update_cache: yes
upgrade: yes
- name: Install packages
community.general.pacman:
name: sudo,zsh,htop,zsh-theme-powerlevel10k-git
state: present
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
- name: Add the user tobi
ansible.builtin.user:
name: tobi
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
comment: Tobias Maier
groups: wheel
shell: /bin/zsh
- name: Add name to git config
community.general.git_config:
name: user.name
scope: global
value: Tobias Maier
- name: Add email to git config
community.general.git_config:
name: user.email
scope: global
value: git@maiertobi.de

156
playbook_sway.yml Normal file
View File

@@ -0,0 +1,156 @@
---
- name: Initial installation of WSL arch
hosts: localhost
become: yes
pre_tasks:
- name: Run the equivalent of "pacman -Syu" as a separate step
community.general.pacman:
update_cache: yes
upgrade: yes
- name: Install packages
community.general.pacman:
name: sudo,htop,base-devel,git
state: present
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
- name: Add the user tobi
ansible.builtin.user:
name: tobi
password: $6$jUZIIwoMDSg8B3OJ$tRKNJe.YHLVQRkbRSvmPJqE4lFUBVKKDxy.K688SW.gUP8VdfrkUeIIa7XqI8ovpncoZlt5VbGk7WxMKBCS191
comment: Tobias Maier
groups: wheel
shell: /bin/zsh
- name: Add name to git config
community.general.git_config:
name: user.name
scope: global
value: Tobias Maier
- name: Add email to git config
community.general.git_config:
name: user.email
scope: global
value: git@maiertobi.de
- name: Create the `aur_builder` user
ansible.builtin.user:
name: aur_builder
create_home: yes
group: wheel
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
ansible.builtin.lineinfile:
path: /etc/sudoers.d/11-install-aur_builder
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
create: yes
validate: 'visudo -cf %s'
- name: Add number of CPUs to MAKEPKG
ansible.builtin.lineinfile:
path: /etc/makepkg.conf
line: 'MAKEFLAGS="-j$(nproc)"'
create: yes
- name: Install paru using makepkg if it isn't installed already
kewlfft.aur.aur:
name: paru
use: makepkg
state: present
become: yes
become_user: aur_builder
- name: Install ZSH-GIT from AUR
community.general.pacman:
name: zsh-git
state: present
executable: paru
become: yes
become_user: aur_builder
- name: Install packages from AUR
community.general.pacman:
name: zsh-git,oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,nano,ly
state: present
executable: paru
become: yes
become_user: aur_builder
- name: Install Sway stuff
community.general.pacman:
name: sway,foot,foot-terminfo
state: present
executable: paru
become: yes
become_user: aur_builder
- name: Add WLR_RENDERER_ALLOW_SOFTWARE to /etc/environment
ansible.builtin.lineinfile:
path: /etc/environment
regexp: '^WLR_RENDERER_ALLOW_SOFTWARE='
line: WLR_RENDERER_ALLOW_SOFTWARE=1
- name: Clone dotfiles
ansible.builtin.git:
repo: https://gitea.maiertobi.de/tobimai/dotfiles.git
dest: /tmp/dotfiles
- name: Copy rc to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.zshrc
dest: /home/tobi/.zshrc
owner: tobi
group: tobi
mode: '0644'
remote_src: yes
- name: Copy p10k to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.p10k.zsh
dest: /home/tobi/.p10k.zsh
owner: tobi
group: tobi
mode: '0644'
remote_src: yes
- name: Ensures sway config direcotry exists
ansible.builtin.file:
path: path=/home/tobi/.config/sway
state: directory
group: tobi
owner: tobi
mode: '0744'
- name: Copy sway config to config
ansible.builtin.copy:
src: //tmp/dotfiles/sway_config
dest: /home/tobi/.config/sway/config
owner: tobi
group: tobi
mode: '0644'
remote_src: yes
- name: Enable service ly, and not touch the state
ansible.builtin.service:
name: ly
enabled: yes
- name: reboot
reboot:

105
playbook_wsl.yml Normal file
View File

@@ -0,0 +1,105 @@
---
- name: Initial installation of WSL arch
hosts: localhost
pre_tasks:
- name: Run the equivalent of "pacman -Syu" as a separate step
community.general.pacman:
update_cache: yes
upgrade: yes
- name: Install packages
community.general.pacman:
name: sudo,zsh,htop,autoconf,automake,binutils,bison,file,findutils,flex,gawk,gcc,gettext,grep,groff,gzip,libtool,m4,make,patch,pkgconf,sed,texinfo,which
state: present
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
- name: Add the user tobi
ansible.builtin.user:
name: tobi
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
comment: Tobias Maier
groups: wheel
shell: /bin/zsh
- name: Add name to git config
community.general.git_config:
name: user.name
scope: system
value: Tobias Maier
- name: Add email to git config
community.general.git_config:
name: user.email
scope: system
value: git@maiertobi.de
- name: Create the `aur_builder` user
ansible.builtin.user:
name: aur_builder
create_home: yes
group: wheel
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
ansible.builtin.lineinfile:
path: /etc/sudoers.d/11-install-aur_builder
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
create: yes
validate: 'visudo -cf %s'
- name: Install paru using makepkg if it isn't installed already
kewlfft.aur.aur:
name: paru
use: makepkg
state: present
become: yes
become_user: aur_builder
- name: Install packages from AUR
community.general.pacman:
name: oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,openssh
state: present
executable: paru
become: yes
become_user: aur_builder
- name: Clone dotfiles
ansible.builtin.git:
repo: https://gitea.maiertobi.de/tobimai/dotfiles.git
dest: /tmp/dotfiles
- name: Copy zshrc to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.zshrc
dest: /home/tobi/.zshrc
owner: tobi
group: tobi
mode: '0644'
- name: Copy p10k to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.p10k.zsh
dest: /home/tobi/.p10k.zsh
owner: tobi
group: tobi
mode: '0644'
- name: Add ssh-rsa to ssh config as this seems to be disabled by default
blockinfile:
path: /etc/ssh/ssh_config
block: |
Host *
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa

View File

@@ -1,3 +1,2 @@
roles:
- name: gantsign.antigen
version: 1.4.0
collections:
- name: kewlfft.aur

View File

@@ -1 +0,0 @@
Hello World