cusux.loginmsg.loginmsg (1.0.4) — module

Alter the pre-login and login text of a UNIX target.

| "added in version" 2.10 of cusux.loginmsg"

Authors: Paul Wetering (@cusux)

preview | supported by community

Install collection

Install with ansible-galaxy collection install cusux.loginmsg:==1.0.4


Add to requirements.yml

  collections:
    - name: cusux.loginmsg
      version: 1.0.4

Description

The C(loginmsg) module alters the MOTD and/or ISSUE file.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create a new pre-login message
- name: Create the pre-login message with fqdn
  loginmsg:
    text: "Welcome to the wonderfull world of whatever."
    when: before
    state: present
    fqdn: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

# Remove the pre-login message
- name: Create the pre-login message with fqdn
  loginmsg:
    text: "Welcome to the wonderfull world of whatever."
    when: before
    state: absent

Inputs

    
fqdn:
    default: false
    description:
    - Define wether or not to add an extra line displaying the targets fqdn.
    type: bool

text:
    description:
    - Text to display before or after user login.
    required: true
    type: str

when:
    choices:
    - before
    - after
    description:
    - Define if the set text is displayed before or after user login.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Define wether or not the text is present.
    type: str