# Ansible scripte ## Setup ```bash # Ensure `ansible-core` is installed using pipx sudo apt remove ansible-core # Install pipx and ansible-core sudo apt-get install pipx pipx install ansible-core # Ensure your path is correct for pipx apps pipx ensurepath # Ensure any shell caching of paths is reset hash -r ``` ## Scripts ```bash # install roles and collections ansible-galaxy install -r requirements.yml # Install the frontend ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass frontend.yaml -K # Github runner ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass github-runner.yaml -K # gitea server ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass gitea.yaml -K # graphana + prometheus ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass monitor.yaml -K # apt-cacheer-ng ansible-playbook -i inventory.yaml --ask-become-pass apt-cacher-ng.yaml -K ``` To make use of the apt cache, ensure you have a file like this with CACHE_HOST changes to your actual host ```bash echo << EOF >> /etc/apt/apt.conf.d/01proxy Acquire::HTTP::Proxy "http://:3142"; Acquire::HTTPS::Proxy "false"; EOF ``` or add these to a Dockerfile ``` RUN echo 'Acquire::HTTP::Proxy "http://:3142";' >> /etc/apt/apt.conf.d/01proxy \ && echo 'Acquire::HTTPS::Proxy "false";' >> /etc/apt/apt.conf.d/01proxy ```