Skip to content

Commit

Permalink
Merge pull request #4 from claranet/remove_banner
Browse files Browse the repository at this point in the history
Remove banner reference
  • Loading branch information
foss25 committed Jun 29, 2022
2 parents dbf4d32 + 9770e5d commit 92cb5bf
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
config:
- image: "amazonlinux"
tag: "latest"
- image: "centos"
tag: "8"
- image: "fedora"
tag: "28"
- image: "debian"
tag: "11"
- image: "debian"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
###VSCode###
.vscode
###MacOS###
.DS_Store

Expand Down
5 changes: 0 additions & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
motd_disable_default_motd: true
motd_banner_template: https://raw.githubusercontent.com/claranet/motd/master/banner
motd_template: https://raw.githubusercontent.com/claranet/motd/master/scripts/00-basic
motd_banner_template_prepend: ""
motd_banner_template_append: ""
motd_template_prepend: ""
motd_template_append: |
Expand All @@ -13,5 +10,3 @@ motd_template_append: |
motd_template_username: ""
motd_template_password: ""
motd_banner_template_username: "{{ motd_template_username }}"
motd_banner_template_password: "{{ motd_template_password }}"
1 change: 0 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
hosts: all
roles:
- role: claranet.motd
motd_banner_template: null

pre_tasks:
- name: "Update APT cache"
Expand Down
5 changes: 0 additions & 5 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
pam_line = f"session optional pam_exec.so type=open_session stdout {motd_file_path}"


def test_banner_file(host):
file = host.file("/etc/banner")
assert not file.exists


def test_motd_file(host):
file = host.file(motd_file_path)
assert file.exists
Expand Down
18 changes: 0 additions & 18 deletions tasks/configure_banner.yml

This file was deleted.

2 changes: 0 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
- include_tasks: configure_banner.yml

- name: include_tasks disable_default_motd.yml if motd_disable_default_motd is True
include_tasks: disable_default_motd.yml
when: motd_disable_default_motd|bool
Expand Down
4 changes: 0 additions & 4 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
_motd_sshd_config_file_path: /etc/ssh/sshd_config
_motd_pam_login_file_path: /etc/pam.d/login
_motd_pam_sshd_file_path: /etc/pam.d/sshd
_motd_banner_file_path: /etc/banner
_motd_banner_state: "{{ 'present' if motd_banner_template else 'absent' }}"
_motd_file_path: /usr/local/bin/dynmotd
_motd_lookup_method: "{{ 'url' if motd_template is match('http(s)?:\/\/') else 'template' }}"
_motd_template_content: "{{ lookup(_motd_lookup_method, motd_template, split_lines=False, username=motd_template_username, password=motd_template_password) }}"
_motd_banner_lookup_method: "{{ 'url' if motd_banner_template is match('http(s)?:\/\/') else 'template' }}"
_motd_banner_template_content: "{{ lookup(_motd_banner_lookup_method, motd_banner_template, split_lines=False, username=motd_banner_template_username, password=motd_banner_template_password) }}"

0 comments on commit 92cb5bf

Please sign in to comment.