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
10 months agoJospeh
10 months agoRory
10 months agoKing
10 months agoMirta
10 months agoLorrine
11 months agoMarjory
11 months agoCristal
11 months agoGilma
11 months agoCarmelina
11 months agoAlpha
11 months agoWilburn
11 months agoJunita
11 months agoBurma
11 months agoRuthann
11 months agoIrene
11 months agoIndia
11 months agoCarman
12 months ago