Skip to content

Commit

Permalink
deploy: ff40788
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 committed May 22, 2024
1 parent 6ca39e5 commit 8945b77
Show file tree
Hide file tree
Showing 19 changed files with 110 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class=
<span class="w"> </span><span class="nt">ansible.windows.win_command</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># When using argv, each entry is quoted in the module</span>
<span class="w"> </span><span class="nt">argv</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">C:\Program Files\My Application\run.exe</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">argument 1</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">-force</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">C:\Program Files\My Application\run.exe</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">argument 1</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">-force</span>
</pre></div>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class=
<span class="w"> </span><span class="nt">ansible.windows.win_copy</span><span class="p">:</span>
<span class="w"> </span><span class="nt">src</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/srv/myfiles/foo.conf</span>
<span class="w"> </span><span class="nt">dest</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">C:\Temp\renamed-foo.conf</span>
<span class="w"> </span><span class="nt">backup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yes</span>
<span class="w"> </span><span class="nt">backup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>

<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Copy a single file keeping the filename</span>
<span class="w"> </span><span class="nt">ansible.windows.win_copy</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,16 @@ <h2><a class="toc-backref" href="#id3" role="doc-backlink">Examples</a><a class=
<span class="w"> </span><span class="nt">ansible.windows.win_dns_client</span><span class="p">:</span>
<span class="w"> </span><span class="nt">adapter_names</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;*&#39;</span>
<span class="w"> </span><span class="nt">dns_servers</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.34.5</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.34.6</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.34.5</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.34.6</span>
<span class="w"> </span><span class="nt">log_path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">C:\dns_log.txt</span>

<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Set IPv6 DNS servers on the adapter named Ethernet</span>
<span class="w"> </span><span class="nt">ansible.windows.win_dns_client</span><span class="p">:</span>
<span class="w"> </span><span class="nt">adapter_names</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Ethernet</span>
<span class="w"> </span><span class="nt">dns_servers</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;2001:db8::2&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;2001:db8::3&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;2001:db8::2&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;2001:db8::3&#39;</span>

<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Configure all adapters whose names begin with Ethernet to use DHCP-assigned DNS values</span>
<span class="w"> </span><span class="nt">ansible.windows.win_dns_client</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,34 +270,37 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class=
<span class="c1"># and will use the passed credentials to join domain if necessary.</span>
<span class="c1"># Ansible connection should use local credentials if possible.</span>
<span class="c1"># If a reboot is required, the second task will trigger one and wait until the host is available.</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">winclient</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Play to join the hsots to a domain</span>
<span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">winclient</span>
<span class="w"> </span><span class="nt">gather_facts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">tasks</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">ansible.windows.win_domain_membership</span><span class="p">:</span>
<span class="w"> </span><span class="nt">dns_domain_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ansible.vagrant</span>
<span class="w"> </span><span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mydomainclient</span>
<span class="w"> </span><span class="nt">domain_admin_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]</span>
<span class="w"> </span><span class="nt">domain_admin_password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password123!</span>
<span class="w"> </span><span class="nt">domain_ou_path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;OU=Windows,OU=Servers,DC=ansible,DC=vagrant&quot;</span>
<span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain</span>
<span class="w"> </span><span class="nt">register</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain_state</span>

<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">ansible.windows.win_reboot</span><span class="p">:</span>
<span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain_state.reboot_required</span>

<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Join host to the ansible.vagrant domain</span>
<span class="w"> </span><span class="nt">ansible.windows.win_domain_membership</span><span class="p">:</span>
<span class="w"> </span><span class="nt">dns_domain_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ansible.vagrant</span>
<span class="w"> </span><span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mydomainclient</span>
<span class="w"> </span><span class="nt">domain_admin_user</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]</span>
<span class="w"> </span><span class="nt">domain_admin_password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password123!</span>
<span class="w"> </span><span class="nt">domain_ou_path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;OU=Windows,OU=Servers,DC=ansible,DC=vagrant&quot;</span>
<span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain</span>
<span class="w"> </span><span class="nt">register</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain_state</span>

<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Reboot host after domain join</span>
<span class="w"> </span><span class="nt">ansible.windows.win_reboot</span><span class="p">:</span>
<span class="w"> </span><span class="nt">when</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">domain_state.reboot_required</span>

<span class="c1"># Host should be in workgroup mywg- module will use the passed credentials to clean-unjoin domain if possible.</span>
<span class="c1"># Ansible connection should use local credentials if possible.</span>
<span class="c1"># The domain admin credentials can be sourced from a vault-encrypted variable</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">winclient</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Play to set the hosts workgroup</span>
<span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">winclient</span>
<span class="w"> </span><span class="nt">gather_facts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">tasks</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">ansible.windows.win_domain_membership</span><span class="p">:</span>
<span class="w"> </span><span class="nt">workgroup_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mywg</span>
<span class="w"> </span><span class="nt">domain_admin_user</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;</span><span class="cp">{{</span> <span class="nv">win_domain_admin_user</span> <span class="cp">}}</span><span class="s">&#39;</span>
<span class="w"> </span><span class="nt">domain_admin_password</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;</span><span class="cp">{{</span> <span class="nv">win_domain_admin_password</span> <span class="cp">}}</span><span class="s">&#39;</span>
<span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">workgroup</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Set workgroup to mywg</span>
<span class="w"> </span><span class="nt">ansible.windows.win_domain_membership</span><span class="p">:</span>
<span class="w"> </span><span class="nt">workgroup_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mywg</span>
<span class="w"> </span><span class="nt">domain_admin_user</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;</span><span class="cp">{{</span> <span class="nv">win_domain_admin_user</span> <span class="cp">}}</span><span class="s">&#39;</span>
<span class="w"> </span><span class="nt">domain_admin_password</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;</span><span class="cp">{{</span> <span class="nv">win_domain_admin_password</span> <span class="cp">}}</span><span class="s">&#39;</span>
<span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">workgroup</span>
</pre></div>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class=

<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Create new Windows domain in a new forest with specific parameters</span>
<span class="w"> </span><span class="nt">ansible.windows.win_domain</span><span class="p">:</span>
<span class="w"> </span><span class="nt">create_dns_delegation</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">no</span>
<span class="w"> </span><span class="nt">create_dns_delegation</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">database_path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">C:\Windows\NTDS</span>
<span class="w"> </span><span class="nt">dns_domain_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ansible.vagrant</span>
<span class="w"> </span><span class="nt">domain_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Win2012R2</span>
Expand Down
Loading

0 comments on commit 8945b77

Please sign in to comment.