Base role for everything:
- install python2
- install common packages
- add public ssh keys
- config ssh, hostname, locale
- sudo without password
Tested on ubuntu 16.04 and ansible 2.2.1.
- Create an
requirements.yml
file:
---
- src: https://github.com/Kroid/ansible-common-role.git
- Install requirements:
ansible-galaxy install -r requirements.yml
- Change
authorized_key_urls
variable. - Define
host_name
variable.
- The role requires
gather_facts: False
in playbook:
- hosts: all
gather_facts: False
roles:
- ansible-common-role
- example
ansible.cfg
:
[defaults]
retry_files_enabled = False
roles_path = roles