{"id":1394,"date":"2022-02-28T22:13:51","date_gmt":"2022-02-28T22:13:51","guid":{"rendered":"https:\/\/www.nicktailor.com\/?p=1394"},"modified":"2022-10-21T11:16:36","modified_gmt":"2022-10-21T11:16:36","slug":"how-to-setup-lvm-with-ansible","status":"publish","type":"post","link":"https:\/\/nicktailor.com\/tech-blog\/how-to-setup-lvm-with-ansible\/","title":{"rendered":"How to Deploy LVM&#8217;s with Ansible"},"content":{"rendered":"<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><strong>Provisioning-LVM-Filesystems:<\/strong><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\">This role is designed to use ansible-merge-vars module. An Ansible plugin to merge all variables in context with a certain suffix (lists or dicts only) and create a new variable that contains the result of this merge. This is an Ansible action plugin, which is basically an Ansible module that runs on the machine running Ansible rather than on the host that Ansible is provisioning.<\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\">Benefits: Configuring disks into LVM<\/p>\n<div class=\"ul\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>Adds Physical Disk to Volume to Volume Group<\/span><\/strong><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>Creates Logical Volume assigned to Volume Group<\/span><\/strong><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>Creates the size of the disk to full or whatever you wish to set<\/span><\/strong><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>It will format the LVM to whatever file format you wish<\/span><\/strong><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>It will then create the mount point and mount the lvm<\/span><\/strong><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #800080;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>&nbsp;<\/span>It will also add the lvm to fstab upon mounting <\/span><\/strong><\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\">Note: This post assumes you have already ansible installed and running.<\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\">Install ansible-merge-vars module:<\/p>\n<p>1.&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #4472c4;\"><em>root@KVM-test-<\/em><\/span><span style=\"color: #4472c4;\"><em>box<\/em><\/span><span style=\"color: #4472c4;\"><em>:~<\/em><\/span><span style=\"color: #4472c4;\"><em>#<\/em> <strong>pip install <\/strong><\/span><strong><span style=\"color: #4472c4;\">ansible_merge_vars<br \/>\n<\/span><span style=\"color: #4472c4;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Requirement already satisfied: <\/span><span style=\"color: #4472c4;\">ansible_merge_vars<\/span><span style=\"color: #4472c4;\"> in<br \/>\n<\/span><span style=\"color: #4472c4;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/<\/span><span style=\"color: #4472c4;\">usr<\/span><span style=\"color: #4472c4;\">\/local\/lib\/python3.8\/<\/span><span style=\"color: #4472c4;\">dist<\/span><span style=\"color: #4472c4;\">-packages (5.0.0)<\/span><\/strong><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 18pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-style: initial; color: #4472c4;\">2.<\/span>Create an <span style=\"color: #c00000;\">action_plugins<\/span> directory in the directory in which you run Ansible.<\/div>\n<p style=\"text-align: left; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 18pt;\"><strong>By default, Ansible will look for action plugins in an <span style=\"color: #800080;\">action_plugins<\/span> folder adjacent to the running playbook. For more information on this, or to change the location where ansible looks for action plugin.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 5pt; padding-bottom: 0; line-height: 1.2; margin-left: 18pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-style: initial; font-size: 12pt;\">3.<\/span>Create a file called <span style=\"color: #c00000;\">merge_vars.py<\/span> (or whatever name you picked) in the <span style=\"color: #c00000;\">action_plugins<\/span> directory, with one line:<\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2;\">\u2003\u2003<em>from ansible_merge_vars import ActionModule<\/em><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2; margin-left: 18pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-style: initial; font-size: 12pt;\">4.<\/span>Save the file<\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">Role Setup:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">Once the plugin has been setup, you <\/span><span style=\"color: #000000;\">now<\/span><span style=\"color: #000000;\"> you will want to setup a role.<\/span><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 54pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">1.<\/span><span style=\"color: #0070c0;\">Move inside the ansible\/roles directory<\/span><\/div>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 90pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #c00000;\">a.<\/span><span style=\"color: #c00000;\">cd ansible\/roles\/<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 54pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">2.<\/span><span style=\"color: #0070c0;\">Create a directory for the role provision-fs<\/span><\/div>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 90pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #c00000;\">b.<\/span><span style=\"color: #c00000;\">mkdir<\/span><span style=\"color: #c00000;\"> -p provision-fs\/tasks<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 54pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">3.<\/span><span style=\"color: #0070c0;\">Move inside the <\/span><span style=\"color: #0070c0;\">tasks<\/span><span style=\"color: #0070c0;\"> directory<\/span><\/div>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 90pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #c00000;\">c.<\/span><span style=\"color: #c00000;\">cd ansible\/roles\/provision-fs\/tasks<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">Now we will create a task that will merge variable names associated with a list and then itemise the list for variables we will pass to provision the filesystem via the <\/span><span style=\"color: #00b0f0;\">inventory\/<\/span><span style=\"color: #00b0f0;\">host_var<\/span><span style=\"color: #000000;\"> or <\/span><span style=\"color: #00b0f0;\">group_var<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 54pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">4.<\/span><span style=\"color: #000000;\">Create a file called <\/span><span style=\"color: #000000;\">main.yml<\/span><span style=\"color: #000000;\"> inside provision-fs\/tasks\/<\/span><span style=\"color: #000000;\">main.yml<\/span><\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Merge VG variables<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merge_vars<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">suffix_to_merge<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">vgs<\/span><span style=\"color: #ce9178;\">__<\/span><span style=\"color: #ce9178;\">to_merge<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merged_var_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">merged_vgs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">expected_type<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8216;list&#8217;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Merge LV variables<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merge_vars<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">suffix_to_merge<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">lvs<\/span><span style=\"color: #ce9178;\">__<\/span><span style=\"color: #ce9178;\">to_merge<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merged_var_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">merged_lvs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">expected_type<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8216;list&#8217;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Merge FS variables<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merge_vars<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">suffix_to_merge<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">fs__<\/span><span style=\"color: #ce9178;\">to_merge<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merged_var_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">merged_fs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">expected_type<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8216;list&#8217;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Merge MOUNT variables<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merge_vars<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">suffix_to_merge<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">mnt<\/span><span style=\"color: #ce9178;\">__<\/span><span style=\"color: #ce9178;\">to_merge<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">merged_var_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">merged_mnt<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">expected_type<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8216;list&#8217;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Create VGs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">lvg<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ item.vg<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">pvs<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item.pvs<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">with_items<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">merged<\/span><span style=\"color: #ce9178;\">_vgs<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Create LVs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">lvol<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ item.vg<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">lv<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ item.lv<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">size<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.size<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">pvs<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item.pvs<\/span><span style=\"color: #ce9178;\"> | default(omit) }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">shrink<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">no<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">with_items<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">merged<\/span><span style=\"color: #ce9178;\">_lvs<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Create FSs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">filesystem<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">dev<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item.dev<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.fstype<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">with_items<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">merged<\/span><span style=\"color: #ce9178;\">_fs<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Mount FSs<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">mount<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">path<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.path<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">src<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item.src<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">state<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">mounted<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.fstype<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">opts<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.opts<\/span><span style=\"color: #ce9178;\"> | default(&#8216;defaults&#8217;) }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">dump<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.dump<\/span><span style=\"color: #ce9178;\"> | default(&#8216;1&#8217;) }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">passno<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">item<\/span><span style=\"color: #ce9178;\">.passno<\/span><span style=\"color: #ce9178;\"> | default(&#8216;2&#8217;) }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">with_items<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">{{ <\/span><span style=\"color: #ce9178;\">merged<\/span><span style=\"color: #ce9178;\">_mnt<\/span><span style=\"color: #ce9178;\"> }}&#8221;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 54pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">5.<\/span><span style=\"color: #000000;\">Save the file<\/span><\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #c00000;\"><em>Note: Now this currently task <\/em><\/span><strong><span style=\"color: #ff0000;\"><em>has no <\/em><\/span><span style=\"color: #ff0000;\"><em>safe guards<\/em><\/span><span style=\"color: #ff0000;\"><em> for \/dev\/<\/em><\/span><span style=\"color: #ff0000;\"><em>sda<\/em><\/span><span style=\"color: #ff0000;\"><em> or checks to ensure the disk is wiped properly in order for the disks to be added to the volume group.<\/em><\/span><\/strong> <span style=\"color: #00b0f0;\"><em>I have created such <\/em><\/span><span style=\"color: #00b0f0;\"><em>safe guards<\/em><\/span><span style=\"color: #00b0f0;\"><em> for others.<\/em><\/span><span style=\"color: #c00000;\"><em> But for the purposes of this blog post this is basics<\/em><\/span><span style=\"color: #c00000;\"><em>. If you want to my help you can contact me via email or the ticketing system.<\/em><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">Now what we are going to do is define our inventory file with what file <\/span><span style=\"color: #000000;\">lvm<\/span><span style=\"color: #000000;\"> we want to <\/span><span style=\"color: #000000;\">crave<\/span><span style=\"color: #000000;\"> out.<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">Setup inventory:<br \/>\n<\/span><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">1.<\/span><span style=\"color: #000000;\">Go inside your inventory\/<\/span><span style=\"color: #000000;\">host_var<\/span><span style=\"color: #000000;\"> or <\/span><span style=\"color: #000000;\">group_var<\/span><span style=\"color: #000000;\"> file<\/span><span style=\"color: #000000;\"> and create a file for testserver1<br \/>\n<\/span><\/p>\n<ul>\n<li style=\"line-height: 1.3;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #c00000;\">.<\/span><span style=\"color: #c00000;\">n<em>ano<\/em><\/span><em><span style=\"color: #c00000;\"> inventory\/<\/span><span style=\"color: #c00000;\">host_var<\/span><span style=\"color: #c00000;\">\/testserver1<\/span><\/em><\/li>\n<\/ul>\n<div>\n<div><span style=\"color: #33cccc;\">vgs__to_merge:<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; vg: vg_vmguest<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; pvs: \/dev\/sdb<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; vg: vg_sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; pvs: \/dev\/sdc<\/span><\/div>\n<div><span style=\"color: #33cccc;\">lvs__to_merge:<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; vg: vg_vmguest<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; lv: lv_vg_vmguest<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; size: 100%FREE<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; shrink: no<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; vg: vg_sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; lv: lv_vg_sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; size: 100%FREE<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; shrink: no<\/span><\/div>\n<div><span style=\"color: #33cccc;\">fs__to_merge:<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; dev: \/dev\/vg_vmguest\/lv_vg_vmguest<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; fstype: ext4<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; dev: \/dev\/vg_sl_storage\/lv_vg_sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; fstype: ext4<\/span><\/div>\n<div><span style=\"color: #33cccc;\">mnt__to_merge:<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; path: \/vmguests<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; src: \/dev\/vg_vmguest\/lv_vg_vmguest<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; fstype: ext4<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &#8211; path: \/sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; src: \/dev\/vg_sl_storage\/lv_vg_sl_storage<\/span><\/div>\n<div><span style=\"color: #993300;\">&nbsp; &nbsp; fstype: ext4<\/span><\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"color: #000000;\">2. save the file. <\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><strong><span style=\"text-decoration: underline;\">Definitions of the variables<\/span><span style=\"text-decoration: underline;\"> above<\/span><span style=\"text-decoration: underline;\">:<\/span><\/strong><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #569cd6;\">vgs<\/span><span style=\"color: #569cd6;\">__<\/span><span style=\"color: #569cd6;\">to_merge<\/span><span style=\"color: #d4d4d4;\">:<\/span><span style=\"color: #d4d4d4;\"> This section is the creation volume\/physical groups<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">vg_vmguest<\/span><span style=\"color: #ce9178;\"> (this is the volume group name)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">pvs<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">sdb<\/span><span style=\"color: #ce9178;\"> (this is the physical assigned to the above volume group<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">vg_sl_storage<\/span><span style=\"color: #ce9178;\"> (This the second volume name)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">pvs<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">sdc<\/span><span style=\"color: #ce9178;\"> (This is the second physical disk assigned to the above <\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #ce9178;\"> volume<\/span><span style=\"color: #ce9178;\"><br \/>\n*You can add as many as you like*<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #569cd6;\">lvs<\/span><span style=\"color: #569cd6;\">__<\/span><span style=\"color: #569cd6;\">to_merge<\/span><span style=\"color: #d4d4d4;\">:<\/span><span style=\"color: #d4d4d4;\"> This section is the logical Volume creations<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">vg_vmguest<\/span><span style=\"color: #ce9178;\"> (this is the volume group created)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">lv<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">lv_vg_vmguest<\/span><span style=\"color: #ce9178;\"> (this is the logical volume that is attached to above vg<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">size<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">100%FREE<\/span><span style=\"color: #ce9178;\"> (this says please use the whole disk)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">shrink<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">no<\/span><span style=\"color: #569cd6;\"> (this is needed to so the disk space is used correctly)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">vg<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">vg_sl_storage<\/span><span style=\"color: #ce9178;\"> (this is the second volume created)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">lv<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">lv_vg_sl_storage<\/span><span style=\"color: #ce9178;\"> (this is the second <\/span><span style=\"color: #ce9178;\">lvm<\/span><span style=\"color: #ce9178;\"> created attached to above vg)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">size<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">100%FREE<\/span><span style=\"color: #ce9178;\"> (this is <\/span><span style=\"color: #ce9178;\">use<\/span><span style=\"color: #ce9178;\"> the whole disk)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">shrink<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">no<\/span><span style=\"color: #569cd6;\"> (this is needed so the disk space is properly used)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #569cd6;\">fs__<\/span><span style=\"color: #569cd6;\">to_merge<\/span><span style=\"color: #d4d4d4;\">:<\/span><span style=\"color: #d4d4d4;\"> This section formats the <\/span><span style=\"color: #d4d4d4;\">lvm<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">dev<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">vg_vmguest<\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">lv_vg_vmguest<\/span><span style=\"color: #ce9178;\"> (<\/span><span style=\"color: #ce9178;\">lvm<\/span><span style=\"color: #ce9178;\"> name)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ext4<\/span><span style=\"color: #ce9178;\"> (file system you want to format with)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">dev<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">vg_sl_storage<\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">lv_vg_sl_storage<\/span><span style=\"color: #ce9178;\"> (2<\/span><span style=\"color: #ce9178;\"><sup>nd<\/sup><\/span> <span style=\"color: #ce9178;\">lvm<\/span><span style=\"color: #ce9178;\"> name)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ext4<\/span><span style=\"color: #ce9178;\"> (file system you want to format with)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #569cd6;\">mnt<\/span><span style=\"color: #569cd6;\">__<\/span><span style=\"color: #569cd6;\">to_merge<\/span><span style=\"color: #d4d4d4;\">:<\/span><span style=\"color: #d4d4d4;\"> This section will create the <\/span><span style=\"color: #d4d4d4;\">path,mount<\/span><span style=\"color: #d4d4d4;\">, and add to <\/span><span style=\"color: #d4d4d4;\">fstab<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">path<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">vmguests<\/span><span style=\"color: #ce9178;\"> (path you want created for mount)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">src<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">vg_vmguest<\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">lv_vg_vmguest<\/span><span style=\"color: #ce9178;\"> (<\/span><span style=\"color: #ce9178;\">lvm<\/span><span style=\"color: #ce9178;\"> you want to mount)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ext4<\/span><span style=\"color: #ce9178;\"> (this is for <\/span><span style=\"color: #ce9178;\">fstab<\/span><span style=\"color: #ce9178;\"> adding)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">path<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">sl_storage<\/span><span style=\"color: #ce9178;\"> (this is second path to create)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">src<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/dev\/<\/span><span style=\"color: #ce9178;\">vg_sl_storage<\/span><span style=\"color: #ce9178;\">\/<\/span><span style=\"color: #ce9178;\">lv_vg_sl_storage<\/span><span style=\"color: #ce9178;\"> (second <\/span><span style=\"color: #ce9178;\">lvm<\/span><span style=\"color: #ce9178;\"> you want to mount)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">fstype<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ext4<\/span><span style=\"color: #ce9178;\"> (to add to <\/span><span style=\"color: #ce9178;\">fstab<\/span><span style=\"color: #ce9178;\">)<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><strong><span style=\"color: #002060;\">Running your playbook: <\/span><\/strong><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">1.<\/span><strong><span style=\"color: #000000;\">Go inside your ansible home directory<\/span><\/strong><\/div>\n<p style=\"text-align: justify; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><strong><span style=\"color: #000000;\">cd ansible\/<\/span><\/strong><\/p>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">2.<\/span><strong><span style=\"color: #000000;\">Create a file called <\/span><span style=\"color: #000000;\">justdofs.yml<\/span><span style=\"color: #000000;\"> and save it<\/span><\/strong><\/div>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><strong><span style=\"color: #c00000;\">Example: of <\/span><span style=\"color: #c00000;\">justdofs<\/span><span style=\"color: #c00000;\">.yml<\/span><\/strong><\/p>\n<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43; margin-left: 36pt;\"><span style=\"color: #d4d4d4;\">&#8211; <\/span><span style=\"color: #569cd6;\">hosts<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">all<\/span><\/p>\n<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43; margin-left: 36pt;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">gather_facts<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">yes<\/span><\/p>\n<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43; margin-left: 36pt;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">any_errors_fatal<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">true<\/span><\/p>\n<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43; margin-left: 36pt;\"><span style=\"color: #d4d4d4;\">&nbsp;&nbsp;<\/span><span style=\"color: #569cd6;\">roles<\/span><span style=\"color: #d4d4d4;\">:<\/span><\/p>\n<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43; margin-left: 36pt;\"><span style=\"color: #d4d4d4;\">&nbsp; &nbsp; &#8211; <\/span><span style=\"color: #569cd6;\">role<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">provision-fs<\/span><\/p>\n<\/div>\n<\/div>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 36pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #002060;\">3.<\/span><strong><span style=\"color: #002060;\">Ensure the testervernick1 is listed under inventory\/hosts<\/span><\/strong><\/div>\n<div class=\"ol\" style=\"margin: 0;\">\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #7030a0;\">a.<\/span><strong><span style=\"color: #7030a0;\">Testservernick1 <\/span><span style=\"color: #7030a0;\">ansible_host<\/span><span style=\"color: #7030a0;\">=192.168.80.200<\/span><\/strong><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><strong><span style=\"color: #0070c0;\">Command:<\/span> <\/strong><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #000080;\">ansible\/$ ansible-playbook -i inventory\/hosts justdofs.yml -u root -k &#8211;limit=&#8217;testservernick1&#8242;<\/span><\/p>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"text-align: justify; margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><strong><span style=\"color: #0070c0;\">Example of successful play:<\/span><\/strong><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ntailor@test-<\/span><span style=\"color: #00b050;\">box<\/span><span style=\"color: #00b050;\">:~<\/span><span style=\"color: #00b050;\">\/ansible\/<\/span><span style=\"color: #00b050;\">computelab<\/span><span style=\"color: #00b050;\">$ ansible-playbook &#8211;<\/span><span style=\"color: #00b050;\">i<\/span><span style=\"color: #00b050;\"> inventory\/hosts <\/span><span style=\"color: #00b050;\">justdofs.yml<\/span><span style=\"color: #00b050;\"> -u root -k &#8211;limit=&#8217;<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">&#8216;<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">SSH password: <\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">PLAY [all] *******************************************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Merge VG variables] *************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">]<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Merge LV variables] *************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">]<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Merge FS variables] *************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">]<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Merge MOUNT variables] **********************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">]<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Create VGs] *********************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;vg&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">vg_vmguest<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">pvs<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">sdb<\/span><span style=\"color: #00b050;\">&#8216;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;vg&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">vg_sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">pvs<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">sdc<\/span><span style=\"color: #00b050;\">&#8216;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Create LVs] *********************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;vg&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">vg_vmguest<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;lv&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">lv_vg_vmguest<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;size&#8217;: &#8216;100%FREE&#8217;, &#8216;shrink&#8217;: False})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;vg&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">vg_sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;lv&#8217;: &#8216;<\/span><span style=\"color: #00b050;\">lv_vg_sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;size&#8217;: &#8216;100%FREE&#8217;, &#8216;shrink&#8217;: False})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Create FSs] *********************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;dev&#8217;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">vg_vmguest<\/span><span style=\"color: #00b050;\">\/<\/span><span style=\"color: #00b050;\">lv_vg_vmguest<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">fstype<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;ext4&#8217;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;dev&#8217;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">vg_sl_storage<\/span><span style=\"color: #00b050;\">\/<\/span><span style=\"color: #00b050;\">lv_vg_sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">fstype<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;ext4&#8217;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">TASK [provision-fs : Mount FSs] **********************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;path&#8217;: &#8216;\/<\/span><span style=\"color: #00b050;\">vmguests<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">src<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">vg_vmguest<\/span><span style=\"color: #00b050;\">\/<\/span><span style=\"color: #00b050;\">lv_vg_vmguest<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">fstype<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;ext4&#8217;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">ok: [<\/span><span style=\"color: #00b050;\">testservernick1<\/span><span style=\"color: #00b050;\">] =&gt; (item<\/span><span style=\"color: #00b050;\">={<\/span><span style=\"color: #00b050;\">&#8216;path&#8217;: &#8216;\/<\/span><span style=\"color: #00b050;\">sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">src<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;\/dev\/<\/span><span style=\"color: #00b050;\">vg_sl_storage<\/span><span style=\"color: #00b050;\">\/<\/span><span style=\"color: #00b050;\">lv_vg_sl_storage<\/span><span style=\"color: #00b050;\">&#8216;, &#8216;<\/span><span style=\"color: #00b050;\">fstype<\/span><span style=\"color: #00b050;\">&#8216;: &#8216;ext4&#8217;})<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">PLAY RECAP *******************************************************************************************************************************************************************************************************<\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.43;\"><span style=\"color: #00b050;\">testservernick<\/span><span style=\"color: #00b050;\">1<\/span><span style=\"color: #00b050;\"> :<\/span><span style=\"color: #00b050;\"> ok=8 &nbsp; &nbsp;changed=0 &nbsp; &nbsp;unreachable=0 &nbsp; &nbsp;failed=0 &nbsp; &nbsp;skipped=0 &nbsp; &nbsp;rescued=0 &nbsp; &nbsp;ignored=0 &nbsp; <\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 8pt; padding-bottom: 0; line-height: 1.3;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Provisioning-LVM-Filesystems: This role is designed to use ansible-merge-vars module. An Ansible plugin to merge all variables in context with a certain suffix (lists or dicts only) and create a new variable that contains the result of this merge. This is an Ansible action plugin, which is basically an Ansible module that runs on the machine running Ansible rather than on<a href=\"https:\/\/nicktailor.com\/tech-blog\/how-to-setup-lvm-with-ansible\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,125,138,29],"tags":[],"class_list":["post-1394","post","type-post","status-publish","format-standard","hentry","category-ansible","category-diskstuff","category-linux","category-logical-volumes"],"_links":{"self":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=1394"}],"version-history":[{"count":13,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1394\/revisions"}],"predecessor-version":[{"id":1587,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1394\/revisions\/1587"}],"wp:attachment":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=1394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=1394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=1394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}