Skip to content

sunscrapers/ansible-role-common

Repository files navigation

Ansible role for common tasks

Build Status

This role manages remote users, authorized keys and ssh keys.

Developed by SUNSCRAPERS with passion & patience.

Installation

$ ansible-galaxy install sunscrapers.common -p roles/

Customization

To customize the role you can override the default variables in the following way:

common_users: ['app']
common_authorized_users: ['root', 'app']
common_authorized_keys: ['https://github.com/haxoza.keys']
common_ssh_private_key: "{{ lookup('file', 'files/id_rsa') }}"
common_ssh_public_key: "{{ lookup('file', 'files/id_rsa.pub') }}"
common_ssh_private_key_filename: ~/.ssh/id_rsa
common_ssh_public_key_filename: ~/.ssh/id_rsa.pub
common_ssh_keys_users: "{{ common_users }}"
common_known_hosts: []
common_ssh_known_hosts_filename: ~/.ssh/known_hosts
common_known_hosts_users: "{{ common_users }}"

Development

To start developing on this Ansible role you need to install Vagrant first. Then run:

$ vagrant up

to start and provision virtual machine. You can run provisioning again to test idempotence:

$ vagrant provision