Use Ansible to Manage Windows Servers (SSH | port 22) - Step by Step Guide

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 36

  • @JamesSpurin
    @JamesSpurin 2 года назад +4

    Brilliant!! This is a huge improvement over the tedious winrm config and troubleshooting

    • @LondonIAC
      @LondonIAC  2 года назад

      Thanks James. Yes, now that SSH is an option for windows servers, I think Ansible management of windows will only grow.

    • @legooos
      @legooos Год назад

      Yep, at some point i just decided that investing time in winrm is not worth it, and then there is video to help me out

  • @aceisastud
    @aceisastud Год назад +2

    I like how your videos are quick and to the point. I appreciate you showing a simple one with ssh. I’m trying to decide on using winrm or ssh. Thanks!

    • @LondonIAC
      @LondonIAC  Год назад +1

      Hi Chad, I feel that SSH is simpler because you don't need to mess around with installing winrm and setting up certificates, as that could be an issue at some work places. If you're managing Linux and windows together with Ansible, the servers would probably sit on the same network and port 22 would probably already be open so again no FW changes to open the winrm ports. Either one will work for you.

    • @aceisastud
      @aceisastud Год назад

      Yeah, I agree SSH seems simpler and with WinRM I almost have to learn a new technology. I’m looking to put an infrastructure in place so I have a good framework. Makes sense to tackle new Tech down the road. Thanks.
      Keyboard Recommendation:
      I actually like my Logitech K520 and K270

  • @andrescorredor7627
    @andrescorredor7627 10 месяцев назад

    This is great Dennis, just what I was looking for

  • @danielmorris8461
    @danielmorris8461 20 дней назад

    Thank you!

  • @Rjagan007
    @Rjagan007 Год назад +1

    Thanks, It helped with my installation.

    • @LondonIAC
      @LondonIAC  Год назад

      You're welcome. Glad it was useful.

  • @pratviper
    @pratviper Год назад +3

    That's very informative thanks!, one question can we use ssh key instead of password to kick off security updates on windows machine?

    • @LondonIAC
      @LondonIAC  Год назад +1

      Hi Prateek, yes you can use an ssh key. Generate one as normal on the linux server and add the public key to the correct location for the admin user (I can't remember off the top of my head but it's not the same place as a standard user).

    • @pratviper
      @pratviper Год назад

      @@LondonIAC thank you

  • @shambhunathsahani6505
    @shambhunathsahani6505 Год назад +2

    Great explained

  • @cptomek81
    @cptomek81 6 месяцев назад

    question for you or request for a piece of advice, I have to manage a very basic setup, 2x HOST HyperV Windows Server 2022 , approx 80 Windows VMs , I see Ansible as a great tool to Provision new VMs , manage Windows Updates and Software Updates, should i use WinRM or SSH

  • @TheLombardo19
    @TheLombardo19 Год назад +2

    Hello. Great work. But i would liked to see an ssh connection with a key and without using the administrator credentials. But it's a good start to use ssh instead of winrm.

    • @LondonIAC
      @LondonIAC  Год назад

      Ideally, you'd set up a domain certificate and start winrm over https with that cert. Then, using kerberos, you would just use kinit to provide the credentials on linux and ansible would connect with no ssh key required.
      Unfortunately I don't have the setup to demo this in AWS yet (like I've done at work).

  • @Quinton1969
    @Quinton1969 Год назад +1

    Mechanical Keyboard - Corsair K70 as a Black Friday deal a few years ago.

    • @LondonIAC
      @LondonIAC  Год назад

      Thanks! I'll look that up.

  • @thereds32
    @thereds32 Год назад +2

    Hi Dennis, If I’ve got 10 windows hosts to manage, how do I put 10 different admin passwords in the [win:vars] file?
    Do we need to install OpenSSH.server? Is openssh.client not enough? Thank you

    • @LondonIAC
      @LondonIAC  Год назад

      This stackoverflow question looks like it should be what you need. You need to use host_vars to manage variables per server. Have a look, and hopefully, it will help you.
      stackoverflow.com/questions/72026361/how-can-i-specify-multiple-users-and-passwords-in-ansible-vault-file
      If you need a bit more help, let me know, and I'll do a video demo on it for you.

    • @thereds32
      @thereds32 Год назад

      @@LondonIAC thank you Dennis, will give this a go.

  • @tonyg460
    @tonyg460 2 года назад +1

    Great post I will test this out thanks for the video

    • @LondonIAC
      @LondonIAC  2 года назад

      No problem 👍 Let me know how it goes.

  • @thereds32
    @thereds32 Год назад +1

    Thank you mate, video liked, subscribed and followed you on LinkedIn 😂😄

  • @MichaelSmith-os8qv
    @MichaelSmith-os8qv Год назад

    Hello, I can not find the descriptions with all commands

    • @LondonIAC
      @LondonIAC  Год назад

      Morning Michael. If you scroll down the description, and see this section at the top:
      "* Issue - During the OpenSSH install, the original command was failing. I've added the updated command below so it the command fails, try the new command. - **"
      - Please click the "show more" button and this will open up on the page and give you the commands you're looking for.
      I hope this helps.

  • @ganeshpasiganti4075
    @ganeshpasiganti4075 2 года назад +1

    Hi
    Could you please paste the ssh commands.

    • @LondonIAC
      @LondonIAC  2 года назад +1

      Hi Ganesh, I've added the windows commands to the description. Is that what you needed?

  • @theconfusedchannel6365
    @theconfusedchannel6365 2 года назад

    Getting this error: (ansible_env) ansible DEVME_WINDOWS -m ping
    [WARNING]: No python interpreters found for host devops1 (tried ['/usr/bin/python', 'python3.9', 'python3.8', 'python3.7',
    'python3.6', 'python3.5', 'python2.7', 'python2.6', '/usr/libexec/platform-python', '/usr/bin/python3', 'python'])
    devops1 | FAILED! => {
    "ansible_facts": {
    "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "module_stderr": "Exception calling \"Create\" with \"1\" argument(s): \"At line:4 char:21
    + def _ansiballz_main():
    + ~
    An expression was expected after '('.
    At line:13 char:27
    + except (AttributeError, OSError):
    + ~
    Missing argument in parameter list.
    At line:15 char:29
    + excludes = set(('', '.', scriptdir))
    + ~

    • @theconfusedchannel6365
      @theconfusedchannel6365 2 года назад +1

      Ansible works for linux hosts

    • @dmccuk
      @dmccuk 2 года назад +1

      Hi,
      When you connect to a windows server, you need to use the equivalent windows module. In this case, try "win_ping" instead of "ping". check 12:24 in the video.
      I hope this resolves your issue.

    • @theconfusedchannel6365
      @theconfusedchannel6365 2 года назад

      @@dmccuk Thanks so much!, yup it works. Sorry I was impatient, was just trying without paying attention I think.

    • @LondonIAC
      @LondonIAC  2 года назад

      See Dennis McCarthy's reply.