mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-12-25 18:10:18 +01:00
README: Reword the option description and provide example
This commit is contained in:
parent
3cad473005
commit
a26ea56332
2 changed files with 31 additions and 11 deletions
27
README.md
27
README.md
|
@ -159,18 +159,23 @@ This is useful mostly when generating configuration snippets to Include.
|
|||
* `sshd_namespace_append`
|
||||
|
||||
By default (*null*), the role defines whole content of the configuration file
|
||||
(with potential system defaults). To allow this role to be invoked from other
|
||||
roles or from multiple places in a single playbok on systems that do not
|
||||
support drop-in directory, we can define namespaces, that will allow us place
|
||||
configuration snippets idempotently into a single configuration file. The only
|
||||
requirement for these instances is to have different namespace name (this
|
||||
variable). Other limitation of openssh configuration file such as that only the
|
||||
first option specified in a configuration file is effective still apply.
|
||||
including system defaults. You can use this variable to invoke this role from
|
||||
other roles or from multiple places in a single playbook on systems that do not
|
||||
support drop-in directory.
|
||||
|
||||
Technically, the snippets are placed in `Match all` blocks (unless they contain
|
||||
other match block) to make sure they are applied regardless the previous match
|
||||
blocks. This allows to configure any non-conflicting options from different
|
||||
roles invocations.
|
||||
When this variable is set, the role places the configuration that you specify
|
||||
to configuration snippets in a existing configuration file under the given
|
||||
namespace. You need to select different namespaces when invoking the role
|
||||
several times.
|
||||
|
||||
Note that limitations of the openssh configuration file still apply. For
|
||||
example, only the first option specified in a configuration file is effective
|
||||
for most of the variables.
|
||||
|
||||
Technically, the role places snippets in `Match all` blocks, unless they contain
|
||||
other match blocks, to ensure they are applied regardless of the previous match
|
||||
blocks in the existing configuration file. This allows configuring any
|
||||
non-conflicting options from different roles invocations.
|
||||
|
||||
|
||||
### Secondary role variables
|
||||
|
|
15
examples/example-accept-env.yml
Normal file
15
examples/example-accept-env.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Configure sshd to accept some useful environment variables
|
||||
include_role:
|
||||
name: ansible-sshd
|
||||
vars:
|
||||
sshd_namespace_append: accept-env
|
||||
sshd_skip_defaults: true
|
||||
sshd:
|
||||
# there are some handy environment variables to accept
|
||||
AcceptEnv:
|
||||
LANG
|
||||
LS_COLORS
|
||||
EDITOR
|
Loading…
Reference in a new issue