Add all hosts to known_hosts automatically
- optimize known_hosts.present state
- add ability to define port
- remove undefined known_hosts if enabled
Related: PROD-25697
Change-Id: Idbaeac91d271693905b53eccf8f6249e7aa274e7
(cherry picked from commit 186b01fb589c04baa2b7eedf0532d1824dbab8f8)
diff --git a/README.rst b/README.rst
index c2d3a3b..35a80f2 100644
--- a/README.rst
+++ b/README.rst
@@ -48,6 +48,31 @@
fingerprint: dd:fa:e8:68:b1:ea:ea:a0:63:f1:5a:55:48:e1:7e:37
fingerprint_hash_type: sha256|md5
+* The OpenSSH client configuration with definition of known_hosts using
+public key instead of fingerprint
+
+ - If `purge_defined` is set to `true` it will remove old known_hosts file
+ and start with a fresh one causing that known_host undefined in the pillar
+ will not be included.
+
+ .. code-block:: yaml
+
+ openssh:
+ client:
+ enabled: true
+ user:
+ root:
+ enabled: true
+ purge_undefined: false
+ user:
+ name: 'root'
+ home: '/root'
+ known_hosts:
+ - name: 10.11.1.50
+ port: 22
+ type: ssh-rsa
+ host_public_key: AAA...fkP
+
* The OpenSSH client configuration with keep alive settings:
.. code-block:: yaml