---

# Role travis tests

- hosts: localhost
  remote_user: root
  roles:
    - "{{ role_name }}"
  post_tasks:
    - include: ./test_common.yml
  vars:
    role_name: "{{ lookup('env','TRAVIS_REPO_SLUG') }}"
    sftp_users:
      - name: 'sftp1'
        authorized_keys:
          - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
      - name: 'sftp2'
        authorized_keys:
          - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
        skeleton: "{{ role_path }}/tests/test_skel"
        shell: '/bin/false'

---

# Role travis tests

- hosts: localhost
  remote_user: root
  pre_tasks:
    - name: 'Create SSH keys pair'
      command: 'ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q -N ""'
      changed_when: False
  roles:
    - "{{ role_name }}"
  post_tasks:
    - include: ./test_common.yml
  vars:
    role_name: "{{ lookup('env','TRAVIS_REPO_SLUG') }}"
    sftp_users:
      - name: 'sftp1'
        authorized_keys:
          - "{{ lookup('file', '/tmp/sshkey.pub') }}"
      - name: 'sftp2'
        authorized_keys:
          - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
        skeleton: "{{ role_path }}/tests/test_skel"
        shell: '/bin/false'

Add SSH key create for Travis testing
Add SSH key create for Travis testing
