{"id":1539,"date":"2022-10-10T07:05:09","date_gmt":"2022-10-10T07:05:09","guid":{"rendered":"https:\/\/www.nicktailor.com\/?p=1539"},"modified":"2022-10-10T07:24:58","modified_gmt":"2022-10-10T07:24:58","slug":"how-to-join-windows-servers-to-your-dc-with-ansible","status":"publish","type":"post","link":"https:\/\/nicktailor.com\/tech-blog\/how-to-join-windows-servers-to-your-dc-with-ansible\/","title":{"rendered":"How to Join Windows Servers to your DC with Ansible"},"content":{"rendered":"<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;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; text-decoration: underline; font-weight: bold;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span><strong>This role will simply join a new windows server to the domain<\/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;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; text-decoration: underline; font-weight: bold;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span><strong>You simply need to define the passed parameters in <span style=\"color: #c00000;\">defaults\/<\/span><span style=\"color: #c00000;\">main.yml<\/span> indicated below<\/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;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; text-decoration: underline; font-weight: bold;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span><strong>This role <span style=\"color: #c00000;\">will ask you for the domain admin password at runtime<\/span> so you will need to know it. Don\u2019t need to worry about vaulting the admin AD password in the code<\/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;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; text-decoration: underline; font-weight: bold;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span><strong><span style=\"color: #ff0000;\">This role assume your windows host is already configured to use winrm<\/span><\/strong><\/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;\"><span style=\"color: #002060;\">How to use this role:<\/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; color: #000000; font-size: 10pt;\">1.<\/span><span style=\"color: #002060;\">You must first download the git repository into your <\/span><span style=\"color: #002060;\">roles<\/span><span style=\"color: #002060;\"> directory usually ansible\/role\/<\/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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">a.<\/span><span style=\"color: #002060;\">git clon<\/span><span style=\"color: #002060;\">e <\/span><a href=\"https:\/\/github.com\/Perfect10NickTailor\/add-server-to-dc.git\">https:\/\/github.com\/Perfect10NickTailor\/add-server-to-dc.git<\/a><\/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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">b.<\/span><a href=\"https:\/\/github.com\/Perfect10NickTailor\/add-server-to-dc\">https:\/\/github.com\/Perfect10NickTailor\/add-server-to-dc<\/a><\/div>\n<p style=\"text-align: left; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; height: 1em;\"><span style=\"display: none;\">.<\/span><\/span><\/p>\n<\/div>\n<\/div>\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; color: #000000; font-size: 10pt;\">2.<\/span><span style=\"color: #002060;\">Now you want edit the <\/span><span style=\"color: #7030a0;\">hosts.client<\/span> <span style=\"color: #002060;\">file <\/span><span style=\"color: #002060;\">name file or create it if it doesn\u2019t exist<\/span><span style=\"color: #002060;\"> under your \u201c<\/span><span style=\"color: #7030a0;\">ansible\/inventory\/<\/span><span style=\"color: #00b050;\">dev:staging:prod<\/span><span style=\"color: #002060;\">\u201d directory. This is a good way to separate environments with ansible, inside each environment you should have a <\/span><span style=\"color: #002060;\">hosts.file<\/span><span style=\"color: #002060;\"> like indicated below.<\/span><\/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;\"><span style=\"color: #002060;\">Example file<\/span><span style=\"color: #0070c0;\">: <\/span><span style=\"color: #0070c0;\">hosts.<\/span><span style=\"color: #0070c0;\">dev<\/span><span style=\"color: #0070c0;\">, <\/span><span style=\"color: #0070c0;\">hosts.staging<\/span><span style=\"color: #0070c0;\">, <\/span><span style=\"color: #0070c0;\">hosts.prod<\/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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">c.<\/span><span style=\"color: #002060;\">Put your server under the appropriate group inside the file and save<\/span><\/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: 108pt;\"><span style=\"display: inline-block; position: relative; text-indent: -9pt; font-style: italic; color: #0070c0;\">i.<\/span><span style=\"color: #0070c0;\"><em>Testmachine1.nicktailor.com<\/em><\/span><span style=\"color: #0070c0;\"><em>l<\/em><\/span> <span style=\"color: #0070c0;\"><em>ansible_host<\/em><\/span><span style=\"color: #0070c0;\"><em>=192.168.<\/em><\/span><span style=\"color: #0070c0;\"><em>1.101<\/em><\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2; text-indent: 36pt;\"><span style=\"color: #ff0000;\">Note: If there is no group simply list the server outside group<\/span><span style=\"color: #ff0000;\">ing, the &#8211;limit flag will pick it <\/span><\/p>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2; text-indent: 36pt;\"><span style=\"color: #ff0000;\">up.<\/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: 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; font-size: 10pt;\">3.<\/span><span style=\"color: #002060;\">Now inside this directory you should see <\/span><strong><span style=\"color: #002060;\">hosts<\/span><\/strong><span style=\"color: #002060;\"> &amp; <\/span><strong><span style=\"color: #002060;\">host_vars<\/span><span style=\"color: #002060;\">, <\/span><span style=\"color: #002060;\">group_vars<\/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: #002060;\">Descriptions:<\/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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">d.<\/span><strong><span style=\"color: #002060;\">Hosts. <\/span><\/strong><span style=\"color: #002060;\">\u2013 is where you will list your servers under specific groups which tell the playbook (what the server is, if it the server should have a specific task run on it, and how to find it)<\/span><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">e.<\/span><strong><span style=\"color: #002060;\">Host_vars<\/span> <\/strong><span style=\"color: #002060;\">\u2013 Inside this directory is where you list the server by name which is you will list under hosts. Inside these files you pass variable parameters to the specific roles when running your playbook. Without these the playbook <\/span><span style=\"color: #002060;\">cant<\/span><span style=\"color: #002060;\"> do the tasks you want it to.<\/span><\/div>\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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">f.<\/span><strong><span style=\"color: #002060;\">Group_vars<\/span><span style=\"color: #002060;\"> \u2013 <\/span><\/strong><span style=\"color: #002060;\">Are how a way to group variables for sets of servers and this keeps code cleaners and easier to manage<\/span><strong><span style=\"color: #002060;\">.<\/span><\/strong><\/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; margin-left: 36pt;\"><strong><span style=\"color: #002060;\">Operational Use:<\/span><\/strong><\/p>\n<\/div>\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; font-size: 10pt;\">4.<\/span><span style=\"color: #002060;\">Move inside <\/span><strong><span style=\"color: #002060;\">host_var<\/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: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">g.<\/span><span style=\"color: #002060;\">cd <\/span><span style=\"color: #002060;\">host_var<\/span><\/div>\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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">h.<\/span><span style=\"color: #002060;\">create a file called <\/span><span style=\"color: #002060;\">{{ <\/span><span style=\"color: #002060;\">servername<\/span><span style=\"color: #002060;\"> }} and save it for us its<\/span> <span style=\"color: #c00000;\">testmachine1.nicktailor.com<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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=\"text-align: justify; margin-top: 0pt; padding-top: 0; 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; font-size: 10pt;\">5.<\/span><span style=\"color: #002060;\">Now inside this directory you should see <\/span><strong><span style=\"color: #002060;\">hosts<\/span><\/strong><span style=\"color: #002060;\"> &amp; <\/span><strong><span style=\"color: #002060;\">host_vars<\/span><span style=\"color: #002060;\">, <\/span><span style=\"color: #002060;\">group_vars<\/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: #002060;\">Descriptions:<\/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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">i.<\/span><strong><span style=\"color: #002060;\">Hosts. <\/span><\/strong><span style=\"color: #002060;\">\u2013 is where you will list your servers under specific groups which tell the playbook (what the server is, if it the server should have a specific task run on it, and how to find it)<\/span><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; color: #000000;\">j.<\/span><strong><span style=\"color: #002060;\">Host_vars<\/span> <\/strong><span style=\"color: #002060;\">\u2013 Inside this directory is where you list the server by name which is you will list under hosts. Inside these files you pass variable parameters to the specific roles when running your playbook. Without these the playbook <\/span><span style=\"color: #002060;\">cant<\/span><span style=\"color: #002060;\"> do the tasks you want it to.<\/span><\/div>\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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">k.<\/span><strong><span style=\"color: #002060;\">Group_vars<\/span><span style=\"color: #002060;\"> \u2013 <\/span><\/strong><span style=\"color: #002060;\">Are how a way to group variables for sets of servers and this keeps code cleaners and easier to manage<\/span><strong><span style=\"color: #002060;\">.<\/span><\/strong><\/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; margin-left: 36pt;\"><strong><span style=\"color: #002060;\">Operational Use:<\/span><\/strong><\/p>\n<\/div>\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; font-size: 10pt;\">6.<\/span><span style=\"color: #002060;\">Move inside <\/span><strong><span style=\"color: #002060;\">host_var<\/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: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">l.<\/span><span style=\"color: #002060;\">cd <\/span><span style=\"color: #002060;\">host_var<\/span><\/div>\n<\/div>\n<div class=\"li\" style=\"margin: 0;\">\n<div style=\"text-align: justify; margin-bottom: 0; padding-bottom: 0; line-height: 1.3; margin-left: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">m.<\/span><span style=\"color: #002060;\">create a file called <\/span><span style=\"color: #002060;\">{{ <\/span><span style=\"color: #002060;\">servername<\/span><span style=\"color: #002060;\"> }} and save it for us its <\/span><span style=\"color: #c00000;\">testmachine1.nicktailor.com<\/span><\/div>\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: 72pt;\"><span style=\"display: inline-block; position: relative; text-indent: -18pt; font-weight: bold; color: #000000;\">n.<\/span><span style=\"color: #002060;\">add the following parameters to your inventory file and save.<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p style=\"margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2;\"><strong><span style=\"color: #002060;\">passed parameters: <\/span><span style=\"color: #00b0f0;\">example: <\/span><span style=\"color: #00b0f0;\">roles\/add-server-to-dc\/default\/<\/span><span style=\"color: #00b0f0;\">main.yml<\/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;\">dns_domain_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ad.nicktailor.com<\/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;\">computer_name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">testmachine1<\/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;\">domain_ou_path<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">&#8220;OU=<\/span><span style=\"color: #ce9178;\">Admin,DC<\/span><span style=\"color: #ce9178;\">=<\/span><span style=\"color: #ce9178;\">nicktailor,DC<\/span><span style=\"color: #ce9178;\">=local&#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: #569cd6;\">domain_admin_user<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">adminuser@nicktailor.com<\/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;\">state<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">domain<\/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: #002060;\">1.<\/span><strong><span style=\"color: #002060;\">You must run your play book from inside parent directory always \u201c<\/span><span style=\"color: #00b0f0;\">ansible<\/span><span style=\"color: #002060;\">\u201d<\/span><\/strong><\/div>\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: #002060;\">2.<\/span><strong><span style=\"color: #002060;\">Now there is a playbook called <\/span><span style=\"color: #c00000;\">joinservertodomain.yml<\/span> <span style=\"color: #002060;\">in the <\/span><span style=\"color: #00b0f0;\">ansible<\/span><span style=\"color: #002060;\"> directory which simply calls the<\/span><\/strong> <strong><span style=\"color: #00b0f0;\">add-servers-to-dc <\/span><span style=\"color: #002060;\">role inside the <\/span><span style=\"color: #002060;\">roles<\/span><span style=\"color: #002060;\"> directory.<\/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;\">ansible<\/span><span style=\"color: #c00000;\">\/<\/span><span style=\"color: #c00000;\">joinservertodomain.yml<\/span><\/strong><\/p>\n<\/div>\n<\/div>\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;\">hosts<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">all<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #569cd6;\">gather_facts<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #569cd6;\">vars_prompt<\/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;\">\u00a0 &#8211; <\/span><span style=\"color: #569cd6;\">name<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">domain_pass<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #569cd6;\">prompt<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">Enter Admin Domain Password<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #569cd6;\">roles<\/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;\">\u00a0 \u00a0 &#8211; <\/span><span style=\"color: #569cd6;\">role<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">add<\/span><span style=\"color: #ce9178;\">&#8211;<\/span><span style=\"color: #ce9178;\">server<\/span><span style=\"color: #ce9178;\">s-<\/span><span style=\"color: #ce9178;\">to<\/span><span style=\"color: #ce9178;\">&#8211;<\/span><span style=\"color: #ce9178;\">dc<\/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: #002060;\">Command:<\/span><\/strong><\/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;\">ansible-playbook &#8211;<\/span><span style=\"color: #002060;\">i<\/span><span style=\"color: #002060;\"> inventory\/dev\/hosts <\/span><span style=\"color: #c00000;\">joinservertodomain.yml<\/span><span style=\"color: #002060;\"> &#8211;<\/span><span style=\"color: #002060;\">&#8211;<\/span><span style=\"color: #002060;\">limit=&#8217;<\/span><span style=\"color: #002060;\">testmachine1.nicktailor.com<\/span><span style=\"color: #002060;\">&#8216;<\/span><\/strong><\/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: 0pt; padding-bottom: 0; line-height: 1.2; margin-left: 18pt;\"><span style=\"display: inline-block; position: relative; color: #000000;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span>-i : This flag tells ansibe-playbook command which hosts file to use, these are always defined by environment like <strong>hosts.dev<\/strong> or <strong>hosts.staging<\/strong><\/div>\n<\/div>\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; color: #000000;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span>-u : this is the ssh_user you will be connecting to the servers with<\/div>\n<\/div>\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; color: #000000;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span>-Kkb : this tells ansible that you will be using sudo su \u2013 for the ssh_user when running all role\/tasks<\/div>\n<\/div>\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; color: #000000;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span>-ask-beocme : is saying become root<\/div>\n<\/div>\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; color: #000000;\"><span style=\"position: absolute; top: -0.34em; left: 0; font-size: 2em;\">\u2022<\/span>\u00a0<\/span>-limit=\u2019server\u2019 : this allows you to segement which server you want to run the playbook against.<\/div>\n<p style=\"text-align: left; 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<p style=\"text-align: left; margin-top: 0pt; padding-top: 0; margin-bottom: 0pt; padding-bottom: 0; line-height: 1.2;\">Successful example run of the book:<\/p>\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;\">[<\/span><span style=\"color: #ce9178;\">alfred<\/span><span style=\"color: #ce9178;\">@<\/span><span style=\"color: #ce9178;\">ansible.nicktailor.com<\/span> <span style=\"color: #ce9178;\">~<\/span><span style=\"color: #d4d4d4;\">]<\/span><span style=\"color: #ce9178;\">$<\/span><span style=\"color: #ce9178;\"> ansible-playbook &#8211;<\/span><span style=\"color: #ce9178;\">i<\/span><span style=\"color: #ce9178;\"> inventory\/hosts <\/span><span style=\"color: #ce9178;\">joinservertodomain.yml<\/span><span style=\"color: #ce9178;\"> &#8211;limit=&#8217;<\/span><span style=\"color: #ce9178;\">testmachine1.nicktailor.com<\/span><span style=\"color: #ce9178;\">&#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: #ce9178;\">ansible-playbook<\/span><span style=\"color: #ce9178;\"> 2.9.27<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">config file = \/etc\/ansible\/<\/span><span style=\"color: #ce9178;\">ansible.cfg<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">configured module search path = [&#8216;\/home\/<\/span><span style=\"color: #ce9178;\">alfred<\/span><span style=\"color: #ce9178;\">\/.ansible<\/span><span style=\"color: #ce9178;\">\/plugins\/modules&#8217;, &#8216;\/<\/span><span style=\"color: #ce9178;\">usr<\/span><span style=\"color: #ce9178;\">\/share\/ansible\/plugins\/modules&#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: #d4d4d4;\">\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">ansible python module location = \/<\/span><span style=\"color: #ce9178;\">usr<\/span><span style=\"color: #ce9178;\">\/lib\/python3.6\/site-packages\/ansible<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">executable location = \/<\/span><span style=\"color: #ce9178;\">usr<\/span><span style=\"color: #ce9178;\">\/bin\/<\/span><span style=\"color: #ce9178;\">ansible-playbook<\/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;\">\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">python version = 3.6.8 (default, Nov 10<\/span><span style=\"color: #ce9178;\"> 2021<\/span><span style=\"color: #ce9178;\">, 06:50:23) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3.0.2)]<\/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: #569cd6;\">PLAYBOOK<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">joinservertodomain.yml<\/span><span style=\"color: #ce9178;\"> *****************************************************************************************************************************************************<\/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;\">Positional arguments<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">joinservertodomain.yml<\/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;\">verbosity<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #b5cea8;\">4<\/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;\">connection<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">smart<\/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;\">timeout<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #b5cea8;\">10<\/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;\">become_method<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">sudo<\/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;\">tags<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">(&#8216;all&#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: #569cd6;\">inventory<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">(&#8216;\/home\/<\/span><span style=\"color: #ce9178;\">alfred<\/span><span style=\"color: #ce9178;\">\/inventory\/hosts&#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: #569cd6;\">subset<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">testmachine1.nicktailor.com<\/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;\">forks<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #b5cea8;\">5<\/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;\">1 <\/span><span style=\"color: #ce9178;\">plays<\/span><span style=\"color: #ce9178;\"> in <\/span><span style=\"color: #ce9178;\">joinservertodomain.yml<\/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;\">Enter Domain Password<\/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=\"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: #ce9178;\">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=\"color: #569cd6;\">META<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ran handlers<\/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: #569cd6;\">TASK [<\/span><span style=\"color: #569cd6;\">addservertodc<\/span><span style=\"color: #d4d4d4;\"> : <\/span><span style=\"color: #ce9178;\">Join windows host to Domain Controller] ********************************************************************************************************************<\/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;\">task path<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">\/home\/<\/span><span style=\"color: #ce9178;\">alfred<\/span><span style=\"color: #ce9178;\">\/roles\/<\/span><span style=\"color: #ce9178;\">addservertodc<\/span><span style=\"color: #ce9178;\">\/tasks\/main.yml:1<\/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;\">Using module file \/usr\/lib\/python3.6\/site-packages\/ansible\/modules\/windows\/win_domain_membership.ps1<\/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;\">Pipelining is enabled.<\/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;\">&lt;<\/span><span style=\"color: #569cd6;\">testmachine1.nicktailor.com<\/span><span style=\"color: #569cd6;\">&gt; ESTABLISH WINRM CONNECTION FOR USER<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ansibleuser<\/span><span style=\"color: #ce9178;\"> on PORT 5986 TO <\/span><span style=\"color: #ce9178;\">testmachine1.nicktailor.com<\/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;\">EXEC (via pipeline wrapper)<\/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;\">changed<\/span><span style=\"color: #d4d4d4;\">: [<\/span><span style=\"color: #ce9178;\">testmachine1.nicktailor.com<\/span><span style=\"color: #d4d4d4;\">] <\/span><span style=\"color: #ce9178;\">=&gt; {<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">&#8220;changed&#8221;<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">true,<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #ce9178;\">reboot<\/span><span style=\"color: #ce9178;\">_required<\/span><span style=\"color: #ce9178;\">&#8220;<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">true<\/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;\">}<\/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: #569cd6;\">TASK [<\/span><span style=\"color: #569cd6;\">addservertodc<\/span><span style=\"color: #d4d4d4;\"> : <\/span><span style=\"color: #ce9178;\">win_reboot<\/span><span style=\"color: #ce9178;\">] ************************************************************************************************************************************************<\/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;\">win_reboot<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">system successfully rebooted<\/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;\">changed<\/span><span style=\"color: #d4d4d4;\">: [<\/span><span style=\"color: #ce9178;\">testmachine1.nicktailor.com<\/span><span style=\"color: #d4d4d4;\">] <\/span><span style=\"color: #ce9178;\">=&gt; {<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">&#8220;changed&#8221;<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">true,<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">&#8220;elapsed&#8221;<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">23,<\/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;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #ce9178;\">&#8220;rebooted&#8221;<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #569cd6;\">true<\/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;\">}<\/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;\">META<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ran handlers<\/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;\">META<\/span><span style=\"color: #d4d4d4;\">: <\/span><span style=\"color: #ce9178;\">ran handlers<\/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: #ce9178;\">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: #569cd6;\">testmachine1.nicktailor.com<\/span><span style=\"color: #d4d4d4;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"color: #d4d4d4;\">\u00a0 :<\/span> <span style=\"color: #ce9178;\">ok=2 \u00a0 \u00a0changed=2 \u00a0 \u00a0unreachable=0 \u00a0 \u00a0failed=0 \u00a0 \u00a0skipped=0 \u00a0 \u00a0rescued=0 \u00a0 \u00a0ignored=0<\/span><span style=\"color: #d4d4d4;\">\u00a0\u00a0\u00a0<\/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;\">\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=\"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","protected":false},"excerpt":{"rendered":"<p>\u2022\u00a0This role will simply join a new windows server to the domain \u2022\u00a0You simply need to define the passed parameters in defaults\/main.yml indicated below \u2022\u00a0This role will ask you for the domain admin password at runtime so you will need to know it. Don\u2019t need to worry about vaulting the admin AD password in the code \u2022\u00a0This role assume your<a href=\"https:\/\/nicktailor.com\/tech-blog\/how-to-join-windows-servers-to-your-dc-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":[31,51,137],"tags":[],"class_list":["post-1539","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-ansible","category-windows"],"_links":{"self":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1539","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=1539"}],"version-history":[{"count":4,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1539\/revisions"}],"predecessor-version":[{"id":1544,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/1539\/revisions\/1544"}],"wp:attachment":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=1539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=1539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=1539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}