Skip to content

ansiblebit/ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh

primogen

License Build Status

Platform Platform

Project Stats

[Ansible][ansible] role to configure ssh and manage known hosts.

Tests

Family Distribution Version Test Status
Debian Debian Jessie x86_64
Debian Debian Wheezy x86_64
Debian Ubuntu Yakkety x86_64
Debian Ubuntu Xenial x86_64
Debian Ubuntu Vivid x86_64
Debian Ubuntu Trusty x86_64
Debian Ubuntu Precise x86_64

Requirements

  • ansible >= 2.0

Role Variables

  • debug: flag to run debug tasks.

  • ssh_config: ssh_config file configuration.

  • ssh_config_path: path to ssh_config file.

  • ssh_config_user: contents of the ~user/.ssh/config for each user.

  • ssh_known_hosts_global_scan: list of hostname that after a keyscan are added to the global ssh_known_hosts file.

  • ssh_known_hosts_global_path: path to the ssh_known_hosts file.

  • ssh_known_hosts_user_scan: list of hostnames that after a keyscan are added to the user's known_hosts file.

  • debug: flag to run debug tasks.

Dependencies

None.

Playbooks

- hosts: servers
  vars:
    ssh_config_user:
      vagrant: |
        Host github.com
            IdentityFile ~/.ssh/deploy

    ssh_known_hosts_global_scan:
      - github.com
    ssh_known_hosts_user_scan:
      - user: vagrant
        hosts:
          - bitbucket.com

  roles:
     - role: ssh

Tags

  • configuration: configuration tasks.
  • debug: task to debug role variables.
  • installation: installation tasks.
  • validation: task to validate role variables.

Test

To run the tests you will need to install:

To run all tests against all pre-defined OS/distributions * ansible versions:

$ tox

To run tests for trusty64:

$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# log file will be stores under tests/log

To perform debugging on a specific environment:

$ cd tests
$ vagrant up trusty64.vagrant.dev

# to provision using the test.yml playbook (as many time as you need)
$ vagrant provision trusty64.vagrant.dev

# to access the Vagrant box
$ vagrant ssh trusty64.vagrant.dev

Links