stephrobert.motd

stephrobert.motd

Maintainer License Release Status Ansible GalaxyAnsible version

⭐ Star us on GitHub — it motivates us a lot!

Configure motd

Platforms Supported:

Platform Versions
Debian bullseye
Ubuntu jammy

⚠️ Requirements

Ansible >= 2.11.

Ansible role dependencies

None.

⚡ Installation

Install with Ansible Galaxy

ansible-galaxy install stephrobert.motd

Install with git

If you do not want a global installation, clone it into your roles_path.

git clone [email protected]:stephrobert/ansible-role-motd.git  stephrobert.motd

But I often add it as a submodule in a given playbook_dir repository.

git submodule add [email protected]:stephrobert/ansible-role-motd.git roles/stephrobert.motd

As the role is not managed by Ansible Galaxy, you do not have to specify the github user account.

✏️ Example Playbook

Basic usage is:

- hosts: all
  roles:
    - role: stephrobert.motd
      vars:
        motd_banner: stephrobert
        motd_disable_default_motd: true
        

⚙️ Role Variables

Variables are divided in three types.

The default vars section shows you which variables you may override in your ansible inventory. As a matter of fact, all variables should be defined there for explicitness, ease of documentation as well as overall role manageability.

The context variables are shown in section below hint you on how runtime context may affects role execution.

Default variables

Role default variables from defaults/main.yml.

Variable Name Value
motd_disable_default_motd True
motd_banner stephrobert

Context variables

Those variables from vars/*.{yml,json} are loaded dynamically during task runtime using the include_vars module.

Variables loaded from vars/main.yml.

Variable Name Value
motd_sshd_config_file_path /etc/ssh/sshd_config.d/10-disable-motd
motd_pam_login_file_path /etc/pam.d/login
motd_pam_sshd_file_path /etc/pam.d/sshd
motd_file_path /usr/local/bin/dynmotd

Author Information

none

About

Configure motd

Install
ansible-galaxy install stephrobert.motd
GitHub repository
License
Unknown
Downloads
5.9k
Owner
I'm Stephane, Infrastructure Enginer from Lille, France. I like to share my knowledges. You can access all examples from my blog in my projects.