пример использования генератора шаблонов playbook --- - name : install apache and upload web page hosts: server1 become: yes vars: source_file: ./mysite2/index.j2 dest_file : /var/www/html/index.html tasks: - name: Install Apache yum: name=httpd state=latest - name: Generate index.html for servers template: src={{ source_file }} dest={{dest_file}} notify: restart apache - name: start and enable httpd service: name=httpd state=started enabled=yes handlers: - name : restart apache service: name=httpd state=restarted be1.ru

Ansible deploy

Данная страница работает на сервере с ip адресом {{ansible_default_ipv4.address}}

На операционной системе linux {{ansible_os_family}}