You've already forked ansible-role-common
Use SElinux module and remove Dynamic MOTD in /etc/profile
This commit is contained in:
@@ -28,23 +28,17 @@
|
|||||||
- yum-utils
|
- yum-utils
|
||||||
tags: packages
|
tags: packages
|
||||||
|
|
||||||
- name: Check SELinux status
|
- name: Ensure SELinux status
|
||||||
command: /usr/sbin/getenforce
|
selinux:
|
||||||
register: result
|
state: disabled
|
||||||
changed_when: False
|
tags: security
|
||||||
|
|
||||||
- name: Disable SELinux now if enabled
|
|
||||||
shell: /usr/sbin/setenforce 0
|
|
||||||
when: result.stdout != "Disabled"
|
|
||||||
|
|
||||||
- name: Check/Set SELinux Disabled on boot
|
|
||||||
selinux: policy=targeted state=disabled
|
|
||||||
|
|
||||||
- name: Configure NTPD
|
- name: Configure NTPD
|
||||||
template:
|
template:
|
||||||
src: ntp.conf.j2
|
src: ntp.conf.j2
|
||||||
dest: /etc/ntp.conf
|
dest: /etc/ntp.conf
|
||||||
tags: ntp
|
tags: ntp
|
||||||
|
|
||||||
- name: Ensure NTPD enabled and started
|
- name: Ensure NTPD enabled and started
|
||||||
service:
|
service:
|
||||||
name: ntpd
|
name: ntpd
|
||||||
@@ -137,6 +131,13 @@
|
|||||||
dest: /usr/local/bin/dynmotd
|
dest: /usr/local/bin/dynmotd
|
||||||
mode: a+x
|
mode: a+x
|
||||||
|
|
||||||
|
|
||||||
|
- name: Configure Dynamic MOTD in profile
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/profile
|
||||||
|
regexp: "^/usr/local/bin/dynmotd"
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Configure Dynamic MOTD in profile
|
- name: Configure Dynamic MOTD in profile
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/profile.d/motd.sh
|
dest: /etc/profile.d/motd.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user