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
2020-01-16 17:17:33 +01:00

36 lines
740 B
YAML

---
# Tasks file for install ntp daemon on Linux system
- name: install apt support on debian
become: yes
package:
name: python3-apt
state: present
changed_when: false
when: ansible_os_family == "Debian"
- name: Update apt cache on Debian Family os
become: yes
apt:
update_cache: yes
changed_when: false
when: ansible_os_family == "Debian"
- name: Update emerge cache on Gentoo
become: yes
shell: emerge-webrsync
changed_when: false
when: ansible_os_family == "Gentoo"
- name: Install ntp daemon on Linux
become: yes
package:
name: "{{ ntp_package }}"
state: present
- name: Service ntp on Linux
become: yes
service:
name: "{{ ntp_service }}"
enabled: yes
state: started