The FASTEST Way to Manage Windows Server 2025 Using SSH and Ansible

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

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

  • @carlosmel7742
    @carlosmel7742 4 วันที่ผ่านมา +1

    Really good videos and well explained. congratulation.
    I've followed tutorial carefully, repeated it many times and always had same issues:
    ansible all -i hosts.ini -m ansible.windows.win_ping -u Administrator --ask-pass
    SSH password:
    server2025 | FAILED! => {
    "changed": false,
    "module_stderr": "Parameter format not correct - ;
    ",
    "module_stdout": "",
    "msg": "MODULE FAILURE
    See stdout/stderr for the exact error",
    "rc": 1
    }
    host.ini file:
    [windows]
    server2025 ansible_host=192.168.1.1
    [windows:vars]
    #ansible_user=administrator
    #ansible_password=your_password
    ansible_connection=ssh
    ansible_shell_type=powershell
    ansible_ssh_common_args='-o StrictHostKeyChecking=no'

    • @automatesql
      @automatesql  4 วันที่ผ่านมา

      Thanks! What version of Ansible are you using? Also just to double check are you able to ssh into the server from the terminal?

    • @carlosmel7742
      @carlosmel7742 4 วันที่ผ่านมา +1

      @automatesql thanks for the quick response. I can SSH from the terminal using the keys without any issues. Version installed is 2.17.7

    • @automatesql
      @automatesql  4 วันที่ผ่านมา +1

      In your command you reference the inventory file as hosts.ini but in the snippet of the inventory file it's labeled as host.ini. Pretty sure that's just a copy / paste issue though. Is the default shell set to powershell on server2025? Here is the full blog post that may help. Doublecheck the prerequisites. www.automatesql.com/blog/how-to-configure-ssh-on-windows-server-2025-for-use-with-ansible

    • @carlosmel7742
      @carlosmel7742 3 วันที่ผ่านมา

      @@automatesql it's a typo here but I'm using the same filename for the file and command