Hi Following is the script to change the timezone in ec2-instance
vars: - timezone: Canada/Eastern - name: Check current timezone shell: awk -F\" '{ print $2}' /etc/sysconfig/clock register: current_zone changed_when: False - name: Set EST timezone file: src=/usr/share/zoneinfo/{{ timezone }} dest=/etc/localtime state=link force=yes when: current_zone.stdout != '{{ timezone }}' i wanted to replace the following /etc/sysconfig/clock UTC entry with variable value defined above. Can someone help me with steps in ansible or shell command to replace the zone ? Thanks in advance. $ cat /etc/sysconfig/clock ZONE="UTC" # UTC to be replaced with Canada/Eastern UTC=true -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7769390f-76e4-4a16-ab75-35cc08e1c39bn%40googlegroups.com.