ProfessionallyEvil / static-analysis-ttp

GNU Lesser General Public License v3.0
1 stars 0 forks source link

[BUG] Issues with ansible-local install #2

Closed elreydetoda closed 3 years ago

elreydetoda commented 3 years ago

Internally we were having issues with someone's vagrant up and ansible-local was failing to install inside the VM. This prevented them from being able to provision anything on their device.

==> linux: Running provisioner: shellcheck (ansible_local)...
    linux: Installing Ansible...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
                add-apt-repository ppa:ansible/ansible -y &&                 apt-get update -y -qq &&                 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ansible --option "Dpkg::Options::=--force-confold"
Stdout from the command:
Cannot add PPA: 'ppa:~ansible/ubuntu/ansible'.
ERROR: '~ansible' user or team does not exist.
Stderr from the command:

Fixed it by adding the following ( which is my normal recommended way of installing ansible for vagrant ):

# this is a script that I own, and you can see the full url here:
#   https://raw.githubusercontent.com/elreydetoda/all-linux-tings/master/scripts/working/install-pip3.sh
#   if you want to pin a specific version feel free to make another shortlink with git.io :)
ansible.pip_install_cmd = "curl -fsSL https://git.io/Jt9mk | sudo bash -xs"
ansible.install_mode = 'pip'