---
|
|
|
|
# Check if python2 installed to server
|
|
|
|
- name: Checkout python2
|
|
hosts: all
|
|
ignore_errors: yes
|
|
vars:
|
|
ansible_python_interpreter: /usr/bin/python3
|
|
roles:
|
|
# install python 2 and pip, use only for python3-only hosts
|
|
#- python2
|
|
|
|
# Ok, now magic begins
|
|
|
|
- hosts: all
|
|
gather_facts: True
|
|
roles:
|
|
# use master key only if you realy want it
|
|
# playbook install it only for root and delete others! allow root auth with key
|
|
#- master_key
|
|
|
|
# upgrade pip before python libs installation in preinstall role
|
|
#- upgrade_pip
|
|
|
|
# preinstall required libs and apps before first server use
|
|
#- preinstall
|
|
|
|
# this role reconfigures sshd server
|
|
- ssh_config
|
|
|
|
# add/remove public keys from servers
|
|
- ssh_access
|
|
|