Need to use the cloud-init option to have it run the PowerShell script that enables WinRM. Use of cloud-init

14 views
Skip to first unread message

Rahul Rawat

unread,
Nov 21, 2019, 5:34:11 AM11/21/19
to Ansible Project
Hi,

I have used oci-ansible-modules to create VM on oracle cloud.
Now, I need to use cloud-init to enable winrm on boot. 

regards,
Rahul Rawat

Karl Auer

unread,
Nov 21, 2019, 6:43:58 AM11/21/19
to ansible-project
Hullo Rahul.

What is your actual question? There is extensive documentation in AWS on how to set up user data to do stuff on launch.

If you just need to do a few simple things, you can do it directly in the user data script. If your needs are more complicated, write a script that looks in a well-known location for other scripts, and executes them.

The way we do it is that we have a standard userdata script that sets up some useful variables, clones a repo out of CodeCommit, then runs all the scripts in the repo.  It's a little more complicated, but that's the general idea. If your scripts rarely change you could deliver them with the AMI. We use the repo so that our scripts are (mostly) independent of the AMI.

For winrm specifically you could also probably enable it via a group policy.

Regards, K.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f2427937-ced6-4696-93ab-d8391f6d5f42%40googlegroups.com.


--

Karl Auer { manager, systems support }
P: 1300 759 975
E: ka...@2pisoftware.com
2pisoftware.com

GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E
Previous:
958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816

Rahul Rawat

unread,
Nov 21, 2019, 9:08:41 AM11/21/19
to Ansible Project
Hi,

I've an idea how to do using Terraform and AWS {using userdata directory} but in this case i'm using Ansible and Oracle cloud.

Create an ansible role and using oci-ansible-module provisioning oracle cloud resources to create VM.

regards,
Rahul

On Thursday, November 21, 2019 at 5:13:58 PM UTC+5:30, Karl Auer wrote:
Hullo Rahul.

What is your actual question? There is extensive documentation in AWS on how to set up user data to do stuff on launch.

If you just need to do a few simple things, you can do it directly in the user data script. If your needs are more complicated, write a script that looks in a well-known location for other scripts, and executes them.

The way we do it is that we have a standard userdata script that sets up some useful variables, clones a repo out of CodeCommit, then runs all the scripts in the repo.  It's a little more complicated, but that's the general idea. If your scripts rarely change you could deliver them with the AMI. We use the repo so that our scripts are (mostly) independent of the AMI.

For winrm specifically you could also probably enable it via a group policy.

Regards, K.

On Thu, Nov 21, 2019 at 9:34 PM Rahul Rawat <r.raw...@gmail.com> wrote:
Hi,

I have used oci-ansible-modules to create VM on oracle cloud.
Now, I need to use cloud-init to enable winrm on boot. 

regards,
Rahul Rawat

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages