{"id":486,"date":"2022-02-05T18:31:08","date_gmt":"2022-02-05T18:31:08","guid":{"rendered":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/aws-devops-engineer-professional-dop-c01-question474\/"},"modified":"2022-02-05T18:31:08","modified_gmt":"2022-02-05T18:31:08","slug":"aws-devops-engineer-professional-dop-c01-question474","status":"publish","type":"post","link":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/aws-devops-engineer-professional-dop-c01-question474\/","title":{"rendered":"AWS DevOps Engineer Professional DOP-C01 &#8211; Question474"},"content":{"rendered":"<div class=\"question\">Which answer is the proper syntax for specifying two target hosts on the command line when running an<br \/>\nAnsible Playbook?<br \/><strong><br \/>A.<\/strong> ansible-playbook -h host1.example.com -i all playbook.yml<br \/><strong>B.<\/strong> ansible-playbook -i host1.example.com playbook.yml<br \/><strong>C.<\/strong> ansible-playbook -h host1.example.com,host2.example.com playbook.yml<br \/><strong>D.<\/strong> ansible-playbook -i host1.example.com,host2.example.com playbook.yml<\/div>\n<p><\/p>\n<style> .hidden-div{ display:none } <\/style>\n<p>\t\t\t\t\t\t\t<button onclick=\"getElementById('hidden-div').style.display = 'block'\"> Show Answer <\/button> <button onclick=\"getElementById('hidden-div').style.display = 'none'\">Hide Answer<\/button><\/p>\n<div class=\"hidden-div\" id=\"hidden-div\"><span style=\"\"><\/p>\n<div class=\"answer\">Correct Answer: <strong>D<\/strong><\/div>\n<p><strong>Explanation:<\/strong> <\/p>\n<div class=\"explanation\">\nExplanation:<br \/>\nAnsible uses the `-i&#8217; flag for accepting an inventory file or host. To allow Ansible to determine if you are passing a host list versus an inventory file the list must be comma separated. If a single host is specified, a trailing comma must be present.<br \/>\nReference:<br \/>\n<a href=\"http:\/\/docs.ansible.com\/ansible\/intro_inventory.html#inventory\" title=\"External link\" rel=\"nofollow noopener\" target=\"_blank\">http:\/\/docs.ansible.com\/ansible\/intro_inventory.html#inventory<\/a><\/div>\n<p><\/strong><\/span> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Which answer is the proper syntax for specifying two target hosts on the command line when running an Ansible Playbook?A. ansible-playbook -h host1.example.com -i all playbook.ymlB. ansible-playbook -i host1.example.com playbook.ymlC. ansible-playbook -h host1.example.com,host2.example.com playbook.ymlD. ansible-playbook -i host1.example.com,host2.example.com playbook.yml Show Answer Hide Answer Correct Answer: D Explanation: Explanation: Ansible uses the `-i&#8217; flag for accepting an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,477],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-aws-devops-engineer-professional-dop-c01","tag-aws-devops-engineer-professional-dop-c01","tag-question-474"],"_links":{"self":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":0,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"wp:attachment":[{"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/DevOps_Engineer_Professional_DOP-C01\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}