myos/ansible/roles/remotes/README.md

1.6 KiB

remotes role for Ansible

Interact with remote services

Role Variables

Default variables

  • remotes_packages - List of packages to install/remove on your hosts
remotes_packages:
- { "name": "remoteit", "state": "present" }
  • remotes_pips - List of python pip packages to install/remove on your hosts
remotes_pips:
- { "name": "awscli", "state": "present" }
- { "name": "docker", "state": "present" }
  • remotes_services - List of services to enable/disable on your hosts
remotes_services:
- { "name": "connectd", "state": "started", "enabled": "yes" }

AWS variables

  • aws_access_key_id - aws_access_key_id to add in ~/.aws/credentials
aws_access_key_id: 'YOUR_ACCESS_KEY_ID'
  • aws_group - Set group of aws configuration files to aws_group
aws_group: 'root'
  • aws_output - output to add in ~/.aws/config
aws_output: json
  • aws_region - region to add in ~/.aws/config
aws_region: 'eu-west-1'
  • aws_secret_access_key - aws_secret_access_key to add in ~/.aws/credentials
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
  • aws_user - Set owner of aws configuration files to aws_user
aws_user: 'root'

Git variables

  • git_repositories - Clone git repositories
git_repositories:
- { "repo": "https://github.com/aynicos/myos", "dest": "/dns/com/github/aynicos/myos", "key_file": "~/.ssh/id_rsa", "version": "master" }

Example playbook

- hosts: 'remotes'
  roles:
  - role: 'aynicos.remotes'
    aws_access_key_id: 'YOUR_ACCESS_KEY_ID'
    aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'