1 2 3 4 5 6 7 8 9 10
--- - name: Check if clock file exists. stat: path=/etc/sysconfig/clock register: clock_file - name: Create clock file if it doesn't exist. template: src: clock.j2 dest: /etc/sysconfig/clock when: clock_file.stat.exists == false