Hi, I’m trying to create folder structure on HDFS storage. I have 3 main 
folders and each has subfolders.


Thank you.

 

*Configuration file:*



companies:
     - company_folder_name: /ibm
       department:
            - it
            - logistic
     - company_folder_name: /hp
       department:
     - company_folder_name: /dell
       department:
            - it

 

 

*Playbook: *


## Createing the main folders - working fine ##
   - name: create company folders
     shell: hadoop fs -mkdir {{ item.company_folder_name }}
     register: result
     ignore_errors: yes
     with_items:
            - "{{ companies }}"

## Create subfolders - Not working ##
   - name: create department folders
     shell: hadoop fs -mkdir {{ item.company_folder_name }}/{{item.department}}
     register: result
     ignore_errors: yes
     with_items:
            - "{{ companies }}"

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c4305a64-6852-4eb5-9141-e63d9c51a1ec%40googlegroups.com.

Reply via email to