This is an Ansible project to take a system from "new install + sshd + python" to configured with my settings and preferences.
Either use your main inventory (/etc/ansible/hosts) or what's defined in ~/.ansible.cfg or system-setup/ansible.cfg 'inventory' variable. Or specify '-i inventory' on the command line.
Refer to the README.md in the 'become' role for managing different become passwords.
If you use any encrypted vaults (become, sshclient, sshserver roles can/should have encrypted vaults), run ansible-playbook(1) with '--ask-vault-pass'. If you do not use the become role, pass '-K' to prompt for the one become password the whole inventory will use.
Use 'ansible-vault create $role/vars/main.yml' and 'ansible-vault edit $role/vars/main.yml' to get started with encrypted vaults for each of the become (for multiple become passwords), sshserver (for installing ssh_host_*_key files), and sshclient (for installing personal ssh key files) roles.
Go through the $role/default/main.yml files and create $role/vars/main.yml files with variables corresponding to your setup.
Either edit laptop-setup.yml/server-setup.yml or create a similar playbook.
While the initial goal of this project was to take a newly installed system from fresh to configured easily, this could be used on existing systems too.
- Install OS
- Make sure sshd is started
- Download SSH Public Key into ~/.ssh/authorized_keys
- Make sure user can run sudo to run commands as root
- Make sure python is installed
Run the ansible-playbook(1) command with the laptop-setup.yml or playbook created above.
This role stores become passwords in a vault allowing the user enter one vault password and become root with other passwords stored in the vault. This role has no tasks or handlers.
This role configures the ssh client, installing personal ssh keys from a vault stored in vars/main.yml
This role configures the ssh server, installing ssh host keys for each server from a vault stored in vars/main.yml
This role installs and configures base level packages and services
This role installs and configures the system for running desktop applications
This role installs and configures the system to run Gnome
None
None
MIT / BSD
Created in 2020 by Michael Erdely