|
- ---
- - import_playbook: playbook_ssh_known_host.yml
- - name: Configure NTP server
- hosts:
- - all
- gather_facts: yes
- vars_files:
- - vars/ntp.yml
- pre_tasks:
- - apt:
- name: '*'
- update_cache: true
- only_upgrade: true
- state: latest
- when: ansible_facts.os_family == "Debian"
- become: true
- become_method: sudo
- - yum:
- name: '*'
- update_cache: true
- security: true
- state: latest
- update_only: true
- when: ansible_facts.os_family == "RedHat"
- become: true
- become_method: sudo
- roles:
- - {role: ntp_server, tags: ["ntp"], become: true, become_method: sudo}
- - {role: iptables, become: true, become_method: sudo}
- ...
|