Unsolved
1 Message
0
285
October 29th, 2020 03:00
Create folder in command line using ansible
I’m trying to create folder structure on HDFS storage. I have 3 main folders and each has subfolders.
I'm having a problem to update the subfolders - I'm expecting that the following commands will be executed
- hadoop fs -mkdir /ibm/it
- hadoop fs -mkdir /ibm/logistic
- hadoop fs -mkdir /hp
- hadoop fs -mkdir /dell/it
- hadoop fs -mkdir /dell/logistic
But instead, the following commands are executed (i used debug msg in order to print the command of the second task that is failed ) It looks that I need to run a loop on department that is a dictionary
ok: [10.201.51.16] => (item={u'department': [u'it', u'logistic'], u'company_folder_name': u'/ibm'}) => {
"msg": "hadoop fs -mkdir /company//ibm/[u'it', u'logistic']"
}
ok: [10.201.51.16] => (item={u'department': None, u'company_folder_name': u'/hp'}) => {
"msg": "hadoop fs -mkdir /company//hp/"
}
ok: [10.201.51.16] => (item={u'department': [u'it'], u'company_folder_name': u'/dell'}) => {
"msg": "hadoop fs -mkdir /company//dell/[u'it']"
No Events found!



DELL-Cares
Moderator
•
27.5K Posts
0
October 29th, 2020 21:00
We tried reaching you on a private message asking for the Service Tag but did not receive a response. Please feel free to reply to the private message whenever you are available.