You've already forked ansible-role-common
Refactored to individual files by function
This commit is contained in:
19
tasks/motd.yml
Normal file
19
tasks/motd.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Ensure Dynamic MOTD Script is in place
|
||||
copy:
|
||||
src: dynmotd
|
||||
dest: /usr/local/bin/dynmotd
|
||||
mode: a+x
|
||||
|
||||
- name: Remove Dynamic MOTD in profile if present
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
regexp: "^/usr/local/bin/dynmotd"
|
||||
state: absent
|
||||
|
||||
- name: Configure Dynamic MOTD in profile.d
|
||||
lineinfile:
|
||||
dest: /etc/profile.d/motd.sh
|
||||
regexp: "^/usr/local/bin/dynmotd"
|
||||
line: "/usr/local/bin/dynmotd"
|
||||
create: yes
|
||||
Reference in New Issue
Block a user