hudecof.banners

Banners

Manage /etc/motd, /etc/issue, and /etc/issue.net

Requirements

To show the ISSUE file, you must add Banner /etc/issue.net to the SSH server configuration file.

Role Variables

All variables are listed in defaults/main.yml

Global

  • banner_prefix: The path prefix where to find templates. By default, it uses the role template. To customize, change it to something like {{ playbook_dir }}/files/banners.
  • banner_updated: Should the last updated date be shown?

ISSUE

  • banner_issue: Should the /etc/issue and /etc/issue.net files be updated?
  • banner_issue_files: A list of files for the issue.
  • banner_issue_template: The name of the template file.

MOTD

  • banner_motd: Should the /etc/motd file be updated?
  • banner_motd_files: A list of files for the motd.
  • banner_motd_template: The name of the template file.

Dependencies

None

Example Playbook


- hosts: servers
  roles:
     - { role: hudecof.banners }

Default ISSUE file

********************************************************************
*                                                                  *
* This system is for the use of authorized users only.  Usage of   *
* this system may be monitored and recorded by system personnel.   *
*                                                                  *
* Anyone using this system expressly consents to such monitoring   *
* and is advised that if such monitoring reveals possible          *
* evidence of criminal activity, system personnel may provide the  *
* evidence from such monitoring to law enforcement officials.      *
*                                                                  *
********************************************************************

Default MOTD file

**********************************************************************
Hostname:             server
Distribution:         Debian stretch (9.3)

Processors:       1
Memory Installed: 0.5GB
Memory Swapfile:  1.0GB
Mounts:
  Mount: /dev/sda1 (/) (7.7GB)

IPv4 default address:	192.168.93.109 (eth0)

Kernel:              4.9.0-4-amd64
Virtualization Role: guest
Virtualization Type: kvm

******************************** 2017-12-18 15:23:57.595459 **********

License

BSD

Author Information

Peter Hudec

Informazioni sul progetto

write banners for MOTD and ISSUE

Installa
ansible-galaxy install hudecof.banners
Licenza
Unknown
Download
257
Proprietario