any idea what is wrong with my playbook here?
- name: Retrieve info about the mount directory
stat:
path: "{{ mount_dir_path }}"
register: mount_dir_stat_first
tags:
- prereqs
# If the mount directory doesn't already exist it is created
- name: Create the mount directory
become: yes
become_method: yes
file:
path: "{{ mount_dir_path }}"
state: directory
mode: 0777
become: yes
become_method: sudo
when: mount_dir_stat_first.stat.exists == False
tags:
- prereqs
# We run stat again to get info about the mount directory post-creation.
This info will be used
# within when statements to make sure that the directory exists and isn't
already being used.
# It's a crude check and I would like to devise a better method.
- name: Retrieve info about the mount directory
stat:
path: "{{ mount_dir_path }}"
register: mount_dir_stat_created
tags:
- prereqs
- name: Mount the ISO
mount:
path: "{{ mount_dir_path }}"
src: "{{ repo_dir }}/{{ vcsa_iso}}"
fstype: iso9660
opts: ro,noauto
state: mounted
become: yes
become_method: sudo
when: mount_dir_stat_created.stat.wusr == True
tags:
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CALmkhkqJZ0_6yfqenCcS__XseHg_VZd3paV0%3Da6kOP0PVndAyg%40mail.gmail.com.