Ansible playbook for setting up my personal PC
- Modify the roles in the
site.ymlthat you would like to apply to the PC. - [Optional] Change the host name in the
site.ymlandinventoryfiles - Run the
install.shscript:. ./install.sh
.
├── roles/
│ ├── fedora-base/
│ │ ├── files/
│ │ │ └── …
│ │ └── tasks/
│ │ ├── main.yml
│ │ └── …
│ ├── fedora-gnome/
│ │ ├── files/
│ │ │ └── …
│ │ └── tasks/
│ │ ├── main.yml
│ │ └── …
│ ├── fedora-intel-graphics/
│ │ ├── files/
│ │ │ └── …
│ │ └── tasks/
│ │ ├── main.yml
│ │ └── …
│ └── …
├── install.sh
├── inventory
├── README.md
└── site.yml
The roles folder contains the configurations for the different roles (see
Roles for more details). Each role contains some tasks and
optionally some files that are used to set up the PC. Tasks are usually
grouped into dnfs, flatpaks and configs the contents of which is applied
through the corresponding main.yml. Change the contents of these tasks to
make changes to how the PC is set up.
The install.sh script is used to start the PC setup installation
The inventory file contains the hosts and their location on which the Ansible
setup runs. Since this is a local installation the location of the host is
"localhost". The name of the host may be changed, but beware that the name also
needs to be changed in the site.yml.
The README.md is this README.
The site.yml is the file that specifies which roles should be applied to which
host. If your PC setup changes in a major way (e.g. different desktop
environment or GPU hardware), apply different roles here (they would of course
need to be defined in the roles directory).
This is the base role for every fedora setup, independent of desktop environment and graphics stack, installing what I consider are must have applications and adjusting the necessary configurations.
This installs gnome specific applications and modifies the environment to fit my liking.
This installs packages and configurations required for seamless usage of Intel GPU hardware on a fedora system.
- If Ansible hangs after you have entered the BECOME password and you have set up fingerprint authentication, simply authenticate with your fingerprint even if you are not prompted to. This is a bug with Ansible.
You can test the Ansible Playbook using the --check flag when calling the
Ansible Playbook command, like so:
ansible-playbook site.yml --inventory inventory --ask-become-pass --check