Split the sshd_config and banner components into sub-states
This commit is contained in:
parent
0a2468d87a
commit
07771c0ebf
13
README.rst
13
README.rst
|
@ -1,7 +1,12 @@
|
|||
openssh
|
||||
=======
|
||||
Install and configure an openssh server.
|
||||
|
||||
openssh
|
||||
-------
|
||||
|
||||
Install openssh and set up the daemon, install a useful banner as well
|
||||
States
|
||||
------
|
||||
``openssh``
|
||||
Installs the ``openssh`` package and service.
|
||||
``openssh.config``
|
||||
Installs the configuration file included in this formula (under "openssh/files").
|
||||
``openssh.banner``
|
||||
Installs a banner that users see when SSH-ing in.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{% from "openssh/map.jinja" import openssh with context %}
|
||||
|
||||
include:
|
||||
- openssh
|
||||
|
||||
sshd_banner:
|
||||
file.managed:
|
||||
- name: {{ openssh.banner }}
|
||||
- source: {{ openssh.banner_src }}
|
||||
- template: jinja
|
|
@ -0,0 +1,12 @@
|
|||
{% from "openssh/map.jinja" import openssh with context %}
|
||||
|
||||
include:
|
||||
- openssh
|
||||
|
||||
sshd_config:
|
||||
file.managed:
|
||||
- name: {{ openssh.sshd_config }}
|
||||
- source: {{ openssh.sshd_config_src }}
|
||||
- watch_in:
|
||||
- service: {{ openssh.service }}
|
||||
|
|
@ -8,17 +8,4 @@ openssh:
|
|||
- name: {{ openssh.service }}
|
||||
- require:
|
||||
- pkg: {{ openssh.server }}
|
||||
- file: sshd_banner
|
||||
- watch:
|
||||
- file: sshd_config
|
||||
|
||||
sshd_config:
|
||||
file.managed:
|
||||
- name: {{ openssh.sshd_config }}
|
||||
- source: {{ openssh.sshd_config_src }}
|
||||
|
||||
sshd_banner:
|
||||
file.managed:
|
||||
- name: {{ openssh.banner }}
|
||||
- source: {{ openssh.banner_src }}
|
||||
- template: jinja
|
||||
|
|
Loading…
Reference in New Issue