Installation & Licensing
Welcome to Autodesk’s Installation and Licensing Forums. Share your knowledge, ask questions, and explore popular Download, Installation, and Licensing topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

new ADSK licensing service - problems when deploying 20,21 versions via Ansible

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
890 Views, 1 Reply

new ADSK licensing service - problems when deploying 20,21 versions via Ansible

Hello!
Has anyone tried to deploy Autodesk 2020+ products through ansible?

I have successfully installed all products up to version 20, i.e. 2017, 18,19

20x versions added a new licensing service
and it is she who incorrectly unfolds through the ansible
more precisely, the products after installation do not pass registration through this service, you have to manually register the product through the CMD and set the licensing type to it, etc.

 

here is an example of my playbook for deploying REVIT 2020
it has two tasks, installation, and additionally, creating a RU shortcut for Revit20:

---
- name: Install Revit 2020
  hosts: all
  gather_facts: false
  tasks:
    - name: Install Revit
      win_package:
        path: \\srv\deploy$\RVT20\Img\setup.exe
        product_id: Revit20
        arguments: '/W /q /I Img\RVT20.ini /language en-us'
        state: present
      tags: rev

    - name: Create revit Rus Shortcut
      win_shortcut:
        description: Revit 2020 RU
        src: '%ProgramFiles%\Autodesk\Revit 2020\Revit.exe'
        dest: '%ProgramData%\Microsoft\Windows\Start Menu\Programs\Autodesk\Revit 2020\Revit 2020 RU.lnk'
        arguments: /language RUS
        icon: '%ProgramFiles%\Autodesk\Revit 2020\Revit.exe,0'
        directory: '%ProgramFiles%\Autodesk\Revit 2020\'
      tags: rev, shortcut

 

 

The installation succeeds, but the 2020 product does not start and reports a Licensing Service error.

it helps to run the command through the CMD:
C: \Program Files(x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe register -pk 829L1 -pv 2020.0.0.F -cf "\\srv\ deploy$\RVT20\Img\x64\RVT\RevitConfig.pit"-el EN



I have one solution so far ..
ansible has a module win_scheduled_task

 

    - name: recover ADSKLic Service
      win_scheduled_task:
        name: ADSK
        description: RecADSK
        actions:
        - path: 'C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe'
          arguments: register -pk 829L1 -pv 2020.0.0.F -cf "\\srv\deploy$\RVT20\Img\x64\RVT\RevitConfig.pit" -el EN
        triggers:
        - type: registration
        frequency: once
        state: present
        enabled: yes
        username: SYSTEM
      tags: rev, adsk, task 

I would not like to pile up crutches during installation .. yes, and this is extra work ..
all versions up to 2020 were installed and launched without any problems via Ansible.
now like this ..

Ansible uses Winrm + Powershell on a Windows machine. perhaps the problem lies in the fact that the AdskLicense service is incorrectly installed through the service .. or I'm wrong.

Labels (3)
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

I will answer myself:
I solved the problem through the scheduler, it works.


  - name: recover ADSKLic Service Trought task scheduler
      win_scheduled_task:
        name: ADSK
        username: SYSTEM
        actions:
        - path: 'C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe'
          arguments: register -pk 829L1 -pv 2020.0.0.F -cf "\\srv\deploy$\RVT20\Img\x64\RVT\RevitConfig.pit" -el EN
       # Remove this action if the task shouldn't be deleted on completion
        - path: cmd.exe
          arguments: /c schtasks.exe /Delete /TN "ADSK" /F
        triggers:
        - type: registration
      tags: task
    - name: Wait for the scheduled task to complete
      win_scheduled_task_stat:
        name: ADSK
        register: task_stat
        until: (task_stat.state is defined and task_stat.state.status != "TASK_STATE_RUNNING") or (task_stat.task_exists == False)
        retries: 7
        delay: 5
      tags: task 


we insert this piece of code after the main deployment.

but for the future, I would like the problem to be fixed.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Administrator Productivity


Autodesk Design & Make Report