Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

342 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible machine 💻

A more complete version of personal dotfiles to automate configuring personal machines.

Pre-requisites

Install Zsh and OhMyZsh for Ubuntu or Debian based distros.

sudo apt install zsh curl git pipx python3-passlib -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
pipx install --include-deps ansible
pipx ensurepath

If you are on ubuntu 26, add yourself to no passwd suoders.

echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/dont-prompt-$USER-for-sudo-password

Define your hostname under hosts.yml locally, together with the variables.

workstation:
  hosts:
    minty.bruteware.cc: {}
    buntu:
      gnome: true
      ansible_become_method: su
    IdeaPad-Flex-5-14ALC05:
      gnome: true
      ansible_become_method: su
    macbookm2:
      mac: true

Force set sudo to classic binary on ubuntu 26

sudo update-alternatives --set sudo /usr/bin/sudo.ws

1 script install (Linux,Mac)

This will install the dotfiles from this repo to your machine.

curl https://raw.githubusercontent.com/brootware/ansible-machine/refs/heads/main/bootstrap.sh > bootstrap.sh && chmod +x bootstrap.sh
./bootstrap.sh -h

Once you're done, remove the earlier suoders file you created.

1 script install (Windows)

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/brootware/ansible-machine/refs/heads/main/bootstrap.ps1" -OutFile "bootstrap.ps1"
.\bootstrap.ps1

Step by step install

Install oh my zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

On ubuntu 26, you also need to install python3 passlib and inject it into pipx

pipx inject ansible passlib

A bit more configuration for latest Ubuntu 26.04 LTS Dekstop. Set root password

sudo passwd root

Install ansible galaxy collections

ansible-galaxy collection install ansible.posix community.general

and run. For BECOME password: supply the root password you've previously set

ansible-pull -U https://github.com/brootware/ansible-machine.git -K -e "user_passwd=$(read -sp 'Enter password: ' p && echo $p)"

For Macbook setup only without creating extra users. Ensure mac is defined in hosts.yml.

ansible-pull -U https://github.com/brootware/ansible-machine.git -K --tags "mac" -vv

You can only choose to install dotfiles using

ansible-pull -U https://github.com/brootware/ansible-machine.git -K --tags "onlydotfiles" -e "target_username=<namehere> target_group=<groupname> target_user_home=<home>"

About

Consolidated repository to automate configuration of servers and workstations in my home. Inspired by Jay from learnlinuxtv. 💻

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages