Changeset - 91b1e458dd17
[Not reviewed]
0 3 0
Branko Majic (branko) - 8 years ago 2017-11-19 19:02:19
branko@majic.rs
MAR-127: Updated documentation and testsite configuration for NTP:

- Updated role reference documentation for common role to list the new
functionality and documented the new parameter.
- Updated usage instructions to mention NTP time synchronisation
configuration.
- Updated testsite configuration to set-up the NTP time
synchronisation.
3 files changed with 28 insertions and 1 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -297,12 +297,14 @@ The role implements the following:
 
  needed. For packages where you want to stick to stable/LTS version branch, you
 
  should be able to use ``~=`` operator (for example ``django~=1.8.0``. Checks
 
  are implemented via `pip-tools <https://github.com/jazzband/pip-tools>`_ and a
 
  custom script that outputs diffs if upgrades are available. Script is run via
 
  cronjob on hourly basis, and any output will be delivered to local ``root``
 
  user.
 
* Optionally configures time synchronisation using NTP (if
 
  ``ntp_servers`` parameter is set).
 

	
 

	
 
Role dependencies
 
~~~~~~~~~~~~~~~~~
 

	
 
Depends on the following roles:
 
@@ -397,12 +399,25 @@ Parameters
 
**incoming_connection_limit_burst** (string, optional, ``9``)
 
  Initial burst of packages that should be accepted when the client with
 
  distinct source IP address connects to the server for the first time (usually
 
  higher than ``incoming_connection_limit``), even if it would go above the
 
  specified connection limit.
 

	
 
**ntp_servers** (list, optional, ``[]``)
 
  List of NTP servers to use for synchronising the time on managed
 
  machine using NTP. If no time synchronisation should be set-up, set
 
  to empty list. Default is not to configure time synchronisation.
 

	
 
  If setting this parameter, it is recommended to set the list of
 
  servers to list shipped by default Debian configuration::
 

	
 
    - "0.debian.pool.ntp.org"
 
    - "1.debian.pool.ntp.org"
 
    - "2.debian.pool.ntp.org"
 
    - "3.debian.pool.ntp.org"
 

	
 
**pipreqcheck_uid** (integer, optional, ``whatever OS picks``)
 
  UID for user running the pip requirements upgrade checks. User is created with
 
  name ``pipreqcheck``.
 

	
 
**pipreqcheck_gid** (integer, optional, ``whatever OS picks``)
 
  GID for user running the pip requirements upgrade checks. Group is created
docs/usage.rst
Show inline comments
 
@@ -445,12 +445,17 @@ Let's take care of this common configuration right away:
 
            - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
 
          password: "{{ 'admin' | password_hash('sha512') }}"
 

	
 
      common_packages:
 
        - emacs24-nox
 

	
 
   .. note::
 
      The ``common`` role comes with ability to set-up time
 
      synchronisation using NTP. This is not done by default. For
 
      details see the role parameter ``ntp_servers``.
 

	
 
6. That's all for configuration, time to apply the changes::
 

	
 
     workon mysite && ansible-playbook playbooks/site.yml
 

	
 
7. After this you should be able to *ssh* from Ansible server onto the managed
 
   servers as user ``admin`` using the *SSH* private key. The ``admin`` user's
testsite/group_vars/all.yml
Show inline comments
 
@@ -79,7 +79,14 @@ backup_server_host_ssh_public_keys:
 
  - "{{ lookup('file', inventory_dir + '/ssh/backup_server_ecdsa_key.pub') }}"
 

	
 
backup_ssh_key: "{{ lookup('file', inventory_dir + '/ssh/' + ansible_fqdn) }}"
 

	
 
# Set-up prompt.
 
prompt_colour: light_purple
 
prompt_id: MAR
 
\ No newline at end of file
 
prompt_id: MAR
 

	
 
# Set-up NTP time synchronisation.
 
ntp_servers:
 
  - "0.debian.pool.ntp.org"
 
  - "1.debian.pool.ntp.org"
 
  - "2.debian.pool.ntp.org"
 
  - "3.debian.pool.ntp.org"
0 comments (0 inline, 0 general)