Symptom:
When we try to put 2 logic commands into 1 element, like find and copy, we hit below errorThe offending line appears to be:
- name: copy env profile script to the target
- find:
^ here
exception type: <class 'yaml.scanner.ScannerError'>
exception: mapping values are not allowed in this context
The part of related yaml file are
tasks:
- name: find and copy env profile scripts
- find:
paths: /u01/app/ansible/repository
patterns: 'apex-ext-stg'
register: file_to_copy
- copy: src={{ item.path }} dest=/tmp mode=0775
with_items: "{{ files_to_copy.files }}"
Reason:
"find" and "copy" are 2 different tasks. we need to use block to group them together , or we level it up with "- name"Solution:
- name: find and copy env profile scriptsblock:
- find:
paths: /u01/app/ansible/repository
patterns: 'test-ext-stg'
register: file_to_copy
- copy: src={{ item.path }} dest=/tmp mode=0775
with_items: "{{ files_to_copy.files }}"
or
- name: find and copy env profile scripts part1
find:
paths: /u01/app/ansible/repository
patterns: 'test-ext-stg'
register: file_to_copy
- name: find and copy env profile scripts part2
copy: src={{ item.path }} dest=/tmp mode=0775
with_items: "{{ files_to_copy.files }}"
31 comments:
Code works. Keep updating Devops Online Course
Worth for my valuable time, I am very much satisfied with your blog. Thanks for sharing.
AngularJS Training in Chennai
AWS Training in Chennai
DevOps Training in Chennai
Spoken English Classes in Chennai
Spoken English Class in Chennai
I like to learn a piece of new information about technology. Im really like your post. Good job.
Struts Training in Chennai
Best Struts Training institute in Chennai
Best Struts Training in Chennai
struts Training in Porur
Wordpress Training in Chennai
Wordpress Training
Spring Training in Chennai
Hibernate Training in Chennai
Excellent blog with unique content, thanks a lot for sharing this. I love to learn more about this topic.
Data Science Training in Chennai
Data Science Certification in Chennai
R Programming Training in Chennai
R analytics Training in Chennai
Machine Learning Training in Chennai
Machine Learning course
Data Science Training in Velachery
Data Science Course in Chennai
Great job done. Excellent post for the freshers. Keep updating it.
TOEFL Coaching in Chennai
TOEFL Coaching Centres in Chennai
German Courses in Chennai
Best IELTS Coaching in Chennai
learn Japanese in Chennai
spanish language classes in chennai
TOEFL Coaching in Anna Nagar
TOEFL Coaching in Tnagar
Spoken English Class in Anna Nagar
spoken english course in anna nagar
Hearty thanks to you admin, your blog is awesome and helpful. Keep your blog with latest information.
RPA Training in Chennai
Robotics Process Automation Training in Chennai
Blue Prism Training in Chennai
Blue Prism Training
Blue Prism Training in Anna Nagar
UiPath Training in Chennai
Data Science Course in Chennai
RPA Training in Anna Nagar
Nice Blog thanks for sharing this information...
RPA training in bellandur
RPA training near bellandur
RPA courses in bellandur
RPA courses near bellandur
RPA classes in bellandur
RPA classes near bellandur
AWS training in bellandur
AWS training near bellandur
AWS courses in bellandur
AWS courses near bellandur
AWS classes in bellandur
AWS classes near bellandur
Nice Post! Thank you for sharing very good post, it was so Nice to read and useful to improve my knowledge as updated one, keep blogging.
ASW training in Electronic City
data science course bangalore is the best data science course
It is an excellent blog. Your post is very good and unique.
DevOps Training in Bangalore
DevOps Training in Marathahalli
Best DevOps Training in Marathahalli
DevOps Training Institutes in Marathahalli
DevOps Institute in Marathahalli
DevOps certification in Chennai
DevOps course in Chennai
Best DevOps Training in Chennai
DOT NET Training in Bangalore
PHP Training in Bangalore
It's remarkable. The way you describe the information is awesome. This will really help me out. Thanks for sharing.
VMware Training in Chennai
VMware Course in Chennai
Vmware Training center in Chennai
Vmware Learning
VMware Training
Vmware cloud certification
wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
Data Science Course
Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
Correlation vs Covariance
Simple linear regression
Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing, data science online training
I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.Best data science courses in hyerabad
As most of the companies are using Python as a basic programming language, there are a lot of job opportunities in Python. Thus online python programming tutorial will be very helpful for your growth in industry. The only need is to select the right course from a right place. data science course in india
List, dictionary and sets are build in data types which allow very high levels of abstraction in a language like python. angular course for beginners
data scientist course in pune with placement was never so easy and adaptable to everyone but here at Excelr We teach you numerous ways of doing Data Science Courses, which are way easy and interesting. Our experienced and expert faculty will help you reach your goal. 100% result oriented strategies are being performed; we offer Data Science Course in pune
data scientist course in pune with placement
Data scientist certification
Data scientist courses
Truly mind blowing blog went amazed with the subject they have developed the content. These kind of posts really helpful to gain the knowledge of unknown things which surely triggers to motivate and learn the new innovative contents. Hope you deliver the similar successive contents forthcoming as well.
data science in bangalore
It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.
data scientist training and placement in hyderabad
Highly appreciable regarding the uniqueness of the content. This perhaps makes the readers feels excited to get stick to the subject. Certainly, the learners would thank the blogger to come up with the innovative content which keeps the readers to be up to date to stand by the competition. Once again nice blog keep it up and keep sharing the content as always.
Data Science Course in Bhilai
Thanks for posting the best information and the blog is very good.digital marketing institute in hyderabad
Thanks for posting the best information and the blog is very good.artificial intelligence course in hyderabad
Thanks for posting the best information and the blog is very good.data science institutes in hyderabad
i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
data science training in gurgaon
The worst part of it was that the software only worked intermittently and the data was not accurate. You obviously canot confront anyone about what you have discovered if the information is not right. data science course in mysore
Informative blog
business analytics course in ludhiana
This post is very simple to read and appreciate without leaving any details out. Great work!
data science online training in hyderabad
This is the first time I visit here. I found such a large number of engaging stuff in your blog, particularly its conversation. From the huge amounts of remarks on your articles, I surmise I am by all accounts not the only one having all the recreation here! Keep doing awesome. It has been important to compose something like this on my site and you have given me a thought.
business analytics course in hyderabad
Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one.
Continue posting. A debt of gratitude is in order for sharing.
data analytics course in kolhapur
私たちはあなたの記事を読み、あなたはそれを非常に明確に説明しています。私たちはあなたの文章力に感謝し、同じように投稿し続けます。
インスタグラムの動画ダウンロード
Post a Comment