1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_ntp.git synced 2024-08-16 12:59:49 +02:00
ansible_role_ntp/tasks/packages/setup-Linux.yml

37 lines
802 B
YAML
Raw Normal View History

2018-12-28 11:54:06 +01:00
---
# Tasks file for install ntp daemon on Linux system
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
update_cache: true
when:
- ansible_pkg_mgr == "apt"
- name: Update emerge cache on Gentoo
become: true
ansible.builtin.shell: emerge-webrsync
changed_when: false
when: ansible_os_family == "Gentoo"
2022-04-07 23:04:39 +02:00
tags: 'skip_ansible_lint'
- name: Remove ntp legacy daemon on Linux
become: true
ansible.builtin.package:
name: "{{ ntp_package_absent }}"
state: absent
- name: Install ntpsec daemon on Linux
become: true
ansible.builtin.package:
2018-12-28 11:54:06 +01:00
name: "{{ ntp_package }}"
state: present
- name: Service ntp on Linux
become: true
ansible.builtin.service:
2018-12-28 11:54:06 +01:00
name: "{{ ntp_service }}"
enabled: true
2018-12-28 11:54:06 +01:00
state: started