- name: kernel settings gather_facts: no hosts: "{{target}}" become: "{{become_var}}" tasks: - name: tune kernel settings blockinfile: block: "{{ lookup('file', 'blockinfile/sysctl.conf') }}" path: /etc/sysctl.conf create: true notify: apply kernel settings # # vmware customize # - include_tasks: sysctl-incl-vmware.yml when: vmware is defined handlers: - name: apply kernel settings shell: executable: /bin/bash cmd: sysctl -p