ansible-fedora-setup

Ansible Fedora Setup

Straightforward ansible playbooks that set up a fresh Fedora install.

Contents | Usage | Development

A straightforward ansible playbook that sets up a fresh Fedora (Workstation & Server edition, >= 42) install. Adds & removes packages, sets up shell, tweaks GNOME & more.

Contents

The playbook contains the following tasks:

Fedora Workstation Server
Upgrade packages
Remove packages
Install deskop apps
Install docker
Install taiscale
Install small utilities
Setup zsh (oh-my-zsh, plugins)
Enable passwordless sudo
Setup tmux
Setup samba
Setup ufw
Disable ssh password auth
Adjust GNOME settings

Usage

[!WARNING]
Never blindly run scripts from the web, including this playbook. Make sure you understand its content.

Direct

Without any extra steps, run the following commands to set up the local machine directly.

# for a workstation
curl -fsSL https://fedora.fjelloverflow.dev/setup/workstation | bash

# for a server
curl -fsSL https://fedora.fjelloverflow.dev/setup/server | bash

Local

To run the playbook with ansible on your local machine, use the following steps.

  1. Install ansible
sudo dnf install -y ansible
  1. Clone this repository
git clone https://github.com/FjellOverflow/ansible-fedora-setup.git && cd ansible-fedora-setup
  1. Run the playbook

[!WARNING]
Note the comma: localhost,

# for a workstation
ansible-playbook -i localhost, -c local playbooks/workstation.yaml -K

# for a server
ansible-playbook -i localhost, -c local playbooks/server.yaml -K

Remote

To set up a remote machine, by running the playbook through ssh, follow these steps.

  1. Install ansible
sudo dnf install -y ansible
  1. Clone this repository
git clone https://github.com/FjellOverflow/ansible-fedora-setup.git && cd ansible-fedora-setup
  1. Create file hosts.yaml in current directory
all:
  hosts:
    remote-machine:
  1. Copy ssh-key to remote machine
ssh-copy-id 192.168.1.123
  1. Run the playbook
# for a workstation
ansible-playbook playbooks/workstation.yaml -K

# for a server
ansible-playbook playbooks/server.yaml -K

Development

To develop this project within VS Code:

Now all ansible files should get linted on every save. Alternatively, you can run ansible-lint --fix on the command line to get a linter report on all project files.