Browse Source

Apply Ansible Galaxy structure

master
Felix Delattre 2 years ago
parent
commit
33e3dedb0e
6 changed files with 138 additions and 16 deletions
  1. +21
    -0
      LICENSE.txt
  2. +39
    -16
      README.md
  3. +69
    -0
      meta/main.yml
  4. +2
    -0
      tests/inventory
  5. +5
    -0
      tests/test.yml
  6. +2
    -0
      vars/main.yml

+ 21
- 0
LICENSE.txt View File

@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Felix Delattre

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 39
- 16
README.md View File

@@ -1,21 +1,44 @@
## SSH server
SSH-Server
=========

#### Preconfigured:
This roles sets up a ssh server with its configuration on a Debian (based) system. It is used for the [provision](https://github.com/oneofftech/provision) setup.

* Only connections with ssh key authentication are possible (no password login).
* `root` access is generally not allowed.
* Only users that are members of the `ssh_login` group can login through ssh.
* Port is switched from `22` to the indicated value from the ansible variable `secure_ssh_port`, which can be [specified conveniently](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#host-variables) in the `ansible.hosts` file.
* A link to download the `authorized_keys` file for ssh must be specified with the variable `ssh_authorized_keys`.
Requirements
----------------

#### You can connect directly with
* Ansible role [xamanu.user](https://galaxy.ansible.com/xamanu/user/)

`ssh -p YOURPORT user@123.456.789.1`
Configuration
----------------

or use an alias in your `.ssh/config` (recommended):
```
Host NAME
Port YOURPORT
User user
Hostname 123.456.789.1
```
-* Only connections with ssh key authentication are possible (no password login).
-* `root` access is generally not allowed.
-* Only users that are members of the `ssh_login` group can login through ssh.
-* Port is switched from `22` to the indicated value from the ansible variable `secure_ssh_port`, which can be [specified conveniently](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#host-variables) in the `ansible.hosts` file.
-* A link to download the `authorized_keys` file for ssh must be specified with the variable `ssh_authorized_keys`.


This is work in progress and it is prefered to collaborate on it. Please communicate over the issue queue. Every pull request is highly appreciated.

Example Playbook
----------------

- hosts: servers
roles:
- { role: xamanu.essentials }



**You can connect directly with**:

-`ssh -p YOURPORT user@123.456.789.1`

License
-------

MIT

Author Information
------------------

Felix Delattre - https://felix.delattre.de

+ 69
- 0
meta/main.yml View File

@@ -0,0 +1,69 @@
galaxy_info:
author: Felix Delattre
description: This roles sets up a ssh server with its configuration on a Debian (based) system
company:

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: MIT

min_ansible_version: 1.2

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:

#
# platforms is a list of platforms, and each platform has a name and a list of versions.
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

platforms:
- name: Debian
versions:
- buster
- stretch

galaxy_tags:
- server
- openssh
- ssh
- provision
- debian
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies:
- xamanu.user
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

+ 2
- 0
tests/inventory View File

@@ -0,0 +1,2 @@
localhost


+ 5
- 0
tests/test.yml View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- ansible-role-ssh-server

+ 2
- 0
vars/main.yml View File

@@ -0,0 +1,2 @@
---
# vars file for ansible-role-ssh-server

Loading…
Cancel
Save