- name: Update apt cahce apt: update_cache=yes cache_valid_time=3600
- name: Install NFS Common on FileServer apt: name={{ item }} state=present with_items: - nfs-common
- name: Create webservers directory file: path: /nfs/{{ item.value.folder }} state: directory with_dict: - "{{ webservers }}"
- mount a webserver for each folder mount: path: /nfs/{{ item.value.folder}} src: {{ item.value.mount }} fstype: nfs state: present with_dict: - "{{ webservers }}- hosts: fileserver become: true become_method: sudo
roles: - mount
vars: webservers: webserver1: folder: webserver1 mount: ip:/var/www/wordpress webserver2: folder: webserver2 mount: ip:/var/www/wordpress
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c0f3ddf9-76e6-4038-8a31-d05b7f04135e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.