ansible/localhost-deploy.sh

17 lines
501 B
Bash
Raw Normal View History

#! /bin/bash
#
# localhost-deploy.sh
# Deploys configs for local machine and only local machine
# Copyright (C) 2020 Vintage Salt <rehashedsalt@cock.li>
#
# Distributed under terms of the MIT license.
#
set -e
if ! command -v ansible > /dev/null 2>&1; then
printf "Installing Ansible and related packages\n"
sudo apt-get install python3-pip python3-setuptools -y
sudo pip3 install ansible
fi
ansible-playbook site.yml -l "$HOSTNAME" -e "ansible_user=$USER" --ask-become-pass --ask-vault-pass "$@"