Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2. ANSIBLE_VERSION=2.7.9
  3.  
  4. apt update
  5. apt install -y python3-apt python3-venv git
  6. /usr/bin/python3 -m venv /usr/lib/virtualenvs/ansible --system-site-packages
  7.  
  8. /usr/lib/virtualenvs/ansible/bin/pip install ansible==${ANSIBLE_VERSION}
  9.  
  10. mkdir -p /etc/ansible
  11. cat <<EOF > /etc/ansible/hosts
  12. [local]
  13. 127.0.0.1 ansible_python_interpreter=/usr/lib/virtualenvs/ansible/bin/python
  14. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement