Step-by-Step Ansible Tutorial for Windows Server 2022: Optimizing WinRM

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 40

  • @stevelewis5325
    @stevelewis5325 11 วันที่ผ่านมา

    I would add:
    Explain what is in your ansible config file, and why.
    Explain what those options are when configuring winrm. Especially the cert part your glossed over.
    Explain how to deal with not hardcoding usernames and passwords in hosts files.
    Service accounts, domain admins, most places don't have the default administrator account enabled these days.
    But it's a good intro

  • @wanderer.1993
    @wanderer.1993 7 หลายเดือนก่อน

    excelente tutorial! life saver for sure. i just want to share a quick observation: if anyone got errors like: "FAILED! => {"msg": "winrm or requests is not installed: No module named 'winrm'"}" verify if you installed the python module called pywinrm for user ansible:
    pip install --user ansible pywinrm

  • @danielmann9982
    @danielmann9982 9 หลายเดือนก่อน

    Great walk-through. Very clear and concise. Thank you very much.

  • @pankajsuryavanshi8332
    @pankajsuryavanshi8332 ปีที่แล้ว +1

    last 3 days i was stuck in ansible windows installation. this video rescued me. please make series on ansible windows

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว

      No problem. I'm glad it helped! What topics would you like me to cover for Ansible & Windows?

    • @kealbo80
      @kealbo80 7 หลายเดือนก่อน

      Setup and manage iis, etc services

    • @kealbo80
      @kealbo80 7 หลายเดือนก่อน

      Build and manage dc, ca, dns, wsus etc

  • @batressc
    @batressc 7 หลายเดือนก่อน

    A huge helpful video for create the HTTPS listener!
    The only point to review maybe in the future is the authentication using other method distinct of Basic authentication (maybe kerberos or CredSSP).
    Thank you for sharing!

  • @tom4794
    @tom4794 3 หลายเดือนก่อน

    What mic / audio setup are you using? Sounds great (which goes a long way making it easy to follow)

  • @jeverett0902
    @jeverett0902 ปีที่แล้ว +3

    Is Ansible for Windows really viable for real world use in your opinion? Last time I looked, the official documentation seemed outdated/neglected, Windows modules development was frozen, and trying to do more serious tasks (installing Windows features, various software, etc) often failed. There also wasn’t good guidance for securing thing with SSH access, Kerberos authentication, domain signed certificates, what’s the relationship between Ansible and DSC, or whatever supersedes DSC, etc. What kind of production uses is Ansible good for that you’ve found? Thanks for your thoughts.

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว +3

      Good question. I've used Anisble with Linux for years, and it's probably the best automation product out there for that use case.
      I first got into using Ansible on Windows when I worked for Red Hat, Consulting for a bank. Back then, it was OK, but there were nowhere near as many modules as there are today. You can check them yourself here: docs.ansible.com/ansible/2.9/modules/list_of_windows_modules.html
      (I think this list is probably out of date!).
      This tutorial is really only for a lab environment. In production, I use Kerberos and a domain certificate for the winRM service and use Ansible to get my kerberos ticket from a password secret (using vault). I have roles to install all sorts of services across different Windows server versions. It's really speeded up this part of the server customization. I also collect about 28 data points from all linux and Windows servers in the various environments using ansible, and this gives us a unified view of our estate (in a spreadsheet!) That enables us to answer lots of questions about our servers very quickly. Handy for management.
      I wouldn't say Ansible is perfect for Windows, but it's definitely viable. One thing I've learned is create a .bat file for the install/ uninstall of your application. Using win_shell: When Windows commands have spaces and quotes can make it very hard to run an installation command with all the required options. Just something I've learned that makes life a lot easier.
      I have a video on here for setting up SSH on Windows servers and setting up the Administrator ssh key, which I think could be the way to go in the future. Many Windows servers live on the save vlan as Linux servers and SSH is probably already open so you don't need to open up 5986 and get FW rules added across your network.
      I hope that helps.

  • @thalesfranca4331
    @thalesfranca4331 11 หลายเดือนก่อน

    Extremely useful!

  • @ontheskyblue
    @ontheskyblue 9 หลายเดือนก่อน

    Thanks for the video

  • @ramankhanna9526
    @ramankhanna9526 ปีที่แล้ว +1

    Thankyou so much !!!

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว

      You're welcome!

  • @alecjoshuaslaton296
    @alecjoshuaslaton296 ปีที่แล้ว

    Very helpful. Thank you

  • @paweenpongsomboon844
    @paweenpongsomboon844 ปีที่แล้ว

    Thanks for your super useful tutorial, I really appreciate your video. I can't express how much I appreciate your channel.
    I just have a question about when we configure Firewall. In production, is it the best practice to do so? It doesn't seem the most secure like you said. If I want to do it the right way, what should I do?

  • @Shadowmansas
    @Shadowmansas ปีที่แล้ว +1

    this isn't tied to ansible in anyway right?
    after that I should PSSession into the windows server with powershell correct?
    I made a powershell script to restart a server but I guess I missed the Certification part, I could make it work without it.

  • @yurmeposhe2512
    @yurmeposhe2512 2 หลายเดือนก่อน

    Hi. I have like 3 powershell script i want to run using ansible . How can i go about this. Thanks

  • @neroliang
    @neroliang หลายเดือนก่อน

    Gracias

  • @ARadicalCut
    @ARadicalCut 11 หลายเดือนก่อน

    I did the setup exactly the same for several servers, seems the "ping" only works on domain controllers not on domain servers, after some searching i found in the eventviewer that the logon attempt happens with the domain set to that of the local machine and not the actual domain which is why it only works on domain controllers apparently. How can i force ansible to authenticate with domain\ansible_usr instead of localserver\ansible_usr?

  • @bagaserlangga9716
    @bagaserlangga9716 ปีที่แล้ว

    thank you!!!!!!

  • @carlosrodrigo9842
    @carlosrodrigo9842 10 หลายเดือนก่อน

    Waht if whe use a Domain Admin?
    I've been trying to set the user connection with Domain admin user,sadly I cannot

  • @brunomartins824
    @brunomartins824 ปีที่แล้ว

    Hi, thanks for the video.
    i'm working with monitoring and need a tool to send/receive files and scripts over internet, because the hosts are spread across the country, is that possible with ansible ?

  • @sureshbatta7047
    @sureshbatta7047 8 หลายเดือนก่อน

    Very helpful

  • @someshsinghisfeelingalive
    @someshsinghisfeelingalive ปีที่แล้ว

    I want to perform oracle db installs and update them when needed. Would any command on the script ran on powershell create any issues or conflicts with the database?
    Also it would really be great if you can start a series for Ansible on production servers, using Active directory authentication for performing windows updates etc etc.
    And yes, this video really helped me clear my doubts. Thanks a lot :)

  • @omprakash-f1i7p
    @omprakash-f1i7p 6 หลายเดือนก่อน

    can we use public ip address of win vm instead of private dns name in inventory file?

  • @SandhyaJha2003
    @SandhyaJha2003 9 หลายเดือนก่อน

    Is there a way to configure wiinrm with ansible raw mode? So that we don't have to rdp to Windows server for running those ConfigureRemoting commands in powershell.

  • @HarishNelapati
    @HarishNelapati 7 หลายเดือนก่อน

    hi sir dont we need service account for authentication windows and ansible?

  • @coreysmall7488
    @coreysmall7488 ปีที่แล้ว +1

    The ps1 from ansible documentation is now gone and I have been searching for some solution to get this to work. You instructions seems promising but your self signed cert code soesn't work for the IP is specific to your setup. I tried changing it to localhost but with no luck. Can you help with that for I'm really bad with dealing with certs.

    • @gerardosubrizio2142
      @gerardosubrizio2142 ปีที่แล้ว

      Same issue here. Where that IP address is coming from? Is it the local address or an external source?

  • @abcdxyz3255
    @abcdxyz3255 9 หลายเดือนก่อน

    sadly everyone uses script which is created for lab, not body is showing manul configuration for windows WINRM on windows server

  • @BigFourHead
    @BigFourHead 6 หลายเดือนก่อน

    sorry but this is for AWS windows server, which isnt really what the tittle says...

  • @ada-j9s
    @ada-j9s ปีที่แล้ว

    I ran the ps1 script from ansible, and followed your instructions, but I'm getting this error "msg": "ssl: auth method ssl requires a password"

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว

      It sounds like the password is the issue. Can you remote desktop into the windows server using the password you have in the inventory file?

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว

      If you're still getting issues create a gist In github with your ansible code, inventory and the error when you run ansible and send the url to me. I may be able to see the issue.
      One other option is to run that error through Google. There may be a stackoverflow post with the fix or what to check/correct.
      Good luck.

    • @ada-j9s
      @ada-j9s ปีที่แล้ว +1

      @@LondonIAC hello, I got it to work. I had a typo in ansible_password on the host file. Thanks!

    • @LondonIAC
      @LondonIAC  ปีที่แล้ว

      @@ada-j9s it's great you got it working!

    • @ada-j9s
      @ada-j9s ปีที่แล้ว

      @@LondonIAC Could you make a video on how to hide the password in the host file? Thanks in advance!