{"id":4546,"date":"2025-06-15T13:45:27","date_gmt":"2025-06-15T13:45:27","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=4546"},"modified":"2025-06-21T18:10:03","modified_gmt":"2025-06-21T18:10:03","slug":"simple-ansible-directory-structure-creation","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=4546","title":{"rendered":"Simple Ansible Directory Structure Creation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You can quickly create an Ansible Directory structure using something like the following example. In my example the Ansible directory is just within my Home Directory, I then have a directory called &#8220;Plays&#8221; where the Ansible Play files are stored and another one called &#8220;Roles&#8221; where the roles are stored. If say we wanted to create a new Play called &#8220;netdata&#8221;, the following could be used to set up the framework ready for use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/ansible\n\nexport PLAYNAME=netdata\n\nmkdir plays\/$PLAYNAME\ntouch plays\/$PLAYNAME\/$PLAYNAME.yml\n\nmkdir -p roles\/$PLAYNAME\/{common,files,handlers,tasks,templates}\ntouch roles\/$PLAYNAME\/tasks\/main.yml<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can quickly create an Ansible Directory structure using something like the following example. In my example the Ansible directory is just within my Home Directory, I then have a directory called &#8220;Plays&#8221; where the Ansible Play files are stored and another one called &#8220;Roles&#8221; where the roles are stored. If say we wanted to &#8230; <a title=\"Simple Ansible Directory Structure Creation\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=4546\" aria-label=\"Read more about Simple Ansible Directory Structure Creation\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":3925,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-4546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ansible"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4546"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4546\/revisions"}],"predecessor-version":[{"id":4547,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4546\/revisions\/4547"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/3925"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}