Skip to content
Snippets Groups Projects
Select Git revision
  • d7656c8168cc24d407714f6e94e8b94b451706d9
  • master default
  • init_facts_module
3 results

collectd.yml

Blame
  • ntpd.yml 514 B
    ---
    
    - assert:
        that: ansible_os_family in [ 'Debian', 'OpenBSD' ]
    
    - name: apt install ntpd
      when: ansible_pkg_mgr == 'apt'
      apt:
        name: ntp
        state: present
        update_cache: yes
        cache_valid_time: 3600
    
    - name: Configure ntpd
      template:
        src: ntpd.conf.j2
        dest: '{{ ntpd_conf[ansible_os_family] }}'
        owner: root
        group: 0
        mode: 0o0644
      notify:
      - Restart ntpd
    
    - name: Enable ntpd
      service:
        name: '{{ ntpd_service[ansible_os_family] }}'
        enabled: yes
        state: started