salt: [BUG] lgpo set failing to set

Description When I apply the state lgpo.set

results in …

----------
          ID: Set Windows Update
    Function: lgpo.set
      Result: True
     Comment: All specified policies are properly configured
     Started: 16:23:05.024000
    Duration: 4938.0 ms
     Changes:

Summary for dtdeaugas424.md-man.biz
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   4.938 s

running salt blah lgpo.get shows the correct results…

Windows Components\Windows Update\Specify intranet Microsoft update service location:
            ----------
            Download files with no Url in the metadata if alternate download server is set.:
                True
            Set the alternate download server:
                http://blah.xx-xxx.comz:8530
            Set the intranet statistics server:
                http://blah.xx-xxx.com:8530
            Set the intranet update service for detecting updates:
                http://blah.xx-xxx.com:8530

however …

opening the UI gpedit.msc shows … image

… and it does not work, however if I cut and paste the URL into the UI and hit apply it works

running the state again shows all well and everything is already configured correctly.

Setup Master is 3000.2 Py3 Minion is 3000.2 Py3

Steps to Reproduce the behavior Run state check gpedit.msc

Expected behavior URL is shown correctly in UI

Screenshots

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Master:
Salt Version:
           Salt: 3000.2

Dependency Versions:
           cffi: 1.9.1
       cherrypy: unknown
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: 3.0.2
      gitpython: 3.0.8
         Jinja2: 2.8.1
        libgit2: Not Installed
       M2Crypto: 0.33.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Aug  7 2019, 17:28:10)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 15.3.0
          smmap: 2.0.5
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.7.1908 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-1062.4.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.7.1908 Core

Minion:
dtdeaugas424.md-man.biz:
    Salt Version:
               Salt: 3000.2

    Dependency Versions:
               cffi: 1.12.2
           cherrypy: 17.4.1
           dateutil: 2.8.0
          docker-py: Not Installed
              gitdb: 2.0.5
          gitpython: Not Installed
             Jinja2: 2.10.1
            libgit2: Not Installed
           M2Crypto: Not Installed
               Mako: 1.0.7
       msgpack-pure: Not Installed
     msgpack-python: 0.5.6
       mysql-python: Not Installed
          pycparser: 2.19
           pycrypto: Not Installed
       pycryptodome: 3.8.1
             pygit2: Not Installed
             Python: 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)]
       python-gnupg: 0.4.4
             PyYAML: 5.1.2
              PyZMQ: 18.0.1
              smmap: 2.0.5
            timelib: 0.2.4
            Tornado: 4.5.3
                ZMQ: 4.3.1

    System Versions:
               dist:
             locale: cp1252
            machine: AMD64
            release: 2019Server
             system: Windows
            version: 2019Server 10.0.17763 SP0 Multiprocessor Free

Additional context

Set Windows Update:
  lgpo.set:
    - computer_policy:
        Configure Automatic Updates:
            Configure automatic updating: 3 - Auto download and notify for install
{% if grains['osfinger'] == 'Windows-2019Server' %}
            Every week: False
            First week of the month: True
            Second week of the month: False
            Third week of the month: False
            Fourth week of the month: False
{% endif %}
            Install during automatic maintenance: False
            Install updates for other Microsoft products: False
            Scheduled install day: 2 - Every Monday
            Scheduled install time: 06:00
        Specify intranet Microsoft update service location:
            Set the intranet update service for detecting updates: http://blah.xx-xxx.com:8530
            Set the intranet statistics server: http://blah.xx-xxx.com:8530
            Download files with no Url in the metadata if alternate download server is set.: True
            Set the alternate download server: http://blah.xx-xxx.com:8530
        Windows Components\Windows Update\Do not allow update deferral policies to cause scans against Windows Update: Disabled

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

I got my GPO rules applied on Windows Server 2019 by using the AMD64 minion version instead of the x86 on 3002.2 https://github.com/saltstack/salt/issues/59550