RedHat EX294 Exam - Topic 12 Question 36 Discussion
Install the RHEL system roles package and create a playbook called timesync.yml that:--> Runs over all managed hosts.--> Uses the timesync role.--> Configures the role to use the time server 192.168.10.254 ( Hear in redhat labuse "classroom.example.com" )--> Configures the role to set the iburst parameter as enabled.
A) Explanation:
Solution as:
# pwd
home/admin/ansible/
# sudo yum install rhel-system-roles.noarch -y
# cd roles/
# ansible-galaxy list
# cp -r /usr/share/ansible/roles/rhelsystem-roles.timesync .
# vim timesync.yml
---
- name: timesynchronization
hosts: all
vars:
timesync_ntp_provider: chrony
timesync_ntp_servers:
- hostname: classroom.example.com _ in exam its ip-address
iburst: yes
timezone: Asia/Kolkata
roles:
- rhel-system-roles.timesync
tasks:
- name: set timezone
timezone:
name: '{{ timezone }}'
:wq!
timedatectl list-timezones | grep india
# ansible-playbook timesync.yml --syntax-check
# ansible-playbook timesync.yml
# ansible all -m shell -a 'chronyc sources -v'
# ansible all -m shell -a 'timedatectl'
# ansible all -m shell -a 'systemctl is-enabled chronyd'
Reta
8 months agoJospeh
8 months agoRory
8 months agoKing
8 months agoMirta
8 months agoLorrine
9 months agoMarjory
9 months agoCristal
9 months agoGilma
9 months agoCarmelina
9 months agoAlpha
9 months agoWilburn
9 months agoJunita
9 months agoBurma
9 months agoRuthann
9 months agoIrene
9 months agoIndia
10 months agoCarman
10 months ago