Skip to content
Snippets Groups Projects
Chris Croome's avatar
e1baf217
History

Ansible localhost Playbook

pipeline status

This repo contains Ansible Playbooks to install software on the localhost using Ansible Galaxy roles.

The usage instructions below assume no major edits are done to this repo locally apart from customising the roles to be run and how they are run, if you want to do things like specify versions of roles in the req.yml playbook that is used to generate the requirements.yml file or add additional roles then you should probably fork this repo.

Usage

Clone this repo and then copy the localhost.yml playbook:

git clone https://git.coop/webarch/localhost.git
cd localhost
cp localhost.yml $(hostname -s).yml

Then edit the $(hostname).yml file as required, for example if you don't need a prompt for the password for sudo or if you want to customise which roles are run, by default no roles are run.

Then run the install.sh script:

./install.sh

The Bash scripts this repo includes:

ansible.sh

The ansible.sh script runs the Ansible role as the user running the script. It doesn't require root or sudo.

firefox.sh

The firefox.sh script runs the Firefox role using the firefox.yml playbook which prompts for a password for sudo.

install.sh

The install.sh script installs all the requirements and runs the $(hostname).yml file if it exists and if not the localhost.yml playbook.

requirements.sh

The requirements.sh script uses the req.yml playbook to update and test the requirements.yml file and the installs all the roles into galaxy/roles.

update.sh

The update.sh script runs the $(hostname).yml file if it exists and if not the localhost.yml playbook. ile.

Copyright

Copyright 2021-2024 Chris Croome, <chris@webarchitects.co.uk>.

This role is released under the same terms as Ansible itself, the GNU GPLv3.