Merge "Support opera test in functest releng"
[releng.git] / prototypes / xci / playbooks / roles / synchronize-time / tasks / main.yml
1 ---
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2017 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 # TODO: this role needs to be adjusted for different distros
11 - block:
12     - name: restart chrony
13       service:
14         name: chrony
15         state: restarted
16     - name: synchronize time
17       shell: "chronyc -a 'burst 4/4' && chronyc -a makestep"
18   when: ansible_distribution_release == "xenial"