--- - name: install packages apt: pkg: "{{item}}" with_items: - postfix - postfix-mysql - name: main configuration template: src: main.cf.j2 dest: /etc/postfix/main.cf notify: reload postfix - include: postfixadmin.yml - name: configuration pull directory local_action: file args: path: ~/host_files/{{inventory_hostname}}/etc state: directory - name: pull configuration synchronize: src: /etc/postfix dest: ~/host_files/{{inventory_hostname}}/etc/ mode: pull recursive: true