You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/automation-hrw-run-runbooks.md
+13-28Lines changed: 13 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,6 @@ Jobs for Hybrid Runbook Workers run under the local **System** account.
46
46
47
47
#### Extension-based Hybrid Workers
48
48
49
-
**PowerShell 7.4**
50
-
51
-
To run PowerShell 7.4 runbooks on a Windows Hybrid Worker, install *PowerShell* on the Hybrid Worker. See [Install PowerShell on Windows](/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5).
52
-
53
-
After PowerShell 7.4 installation is complete, create an environment variable with Variable name as powershell_7_4_path and Variable value as location of the executable *PowerShell*. Restart the Hybrid Runbook Worker after environment variable is created successfully.
54
-
55
49
> [!NOTE]
56
50
> To create environment variable in Windows systems, follow these steps:
57
51
> 1. Go to **Control Panel** > **System** > **Advanced System Settings**.
@@ -60,6 +54,12 @@ After PowerShell 7.4 installation is complete, create an environment variable wi
60
54
> 1. Provide **Variable name** and **Variable value**, and then select **OK**.
61
55
> 1. Restart the VM or logout from the current user and login to implement the environment variable changes.
62
56
57
+
**PowerShell 7.4**
58
+
59
+
To run PowerShell 7.4 runbooks on a Windows Hybrid Worker, install *PowerShell* on the Hybrid Worker. See [Install PowerShell on Windows](/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5).
60
+
61
+
After PowerShell 7.4 installation is complete, create an environment variable with Variable name as powershell_7_4_path and Variable value as location of the executable *PowerShell*. Restart the Hybrid Runbook Worker after environment variable is created successfully.
62
+
63
63
**PowerShell 7.2**
64
64
65
65
To run PowerShell 7.2 runbooks on a Windows Hybrid Worker, install *PowerShell* on the Hybrid Worker. See [Install PowerShell on Windows](/powershell/scripting/install/installing-powershell-on-windows).
@@ -97,20 +97,20 @@ If the *Python* executable file is at the default location *C:\Python27\python.e
97
97
>- PowerShell 5.1, PowerShell 7.1(preview), Python 2.7, Python 3.8 runbooks are supported on both extension-based and agent-based Linux Hybrid Runbook Workers. For agent-based workers, ensure the Linux Hybrid Runbook worker version is 1.7.5.0 or above.
98
98
>- PowerShell 7.2 and Python 3.10 (preview) runbooks are supported on extension-based Linux Hybrid Workers only. Ensure the Linux Hybrid worker extension version is 1.1.11 or above.
To run PowerShell 7.4 runbooks on a Linux Hybrid Worker, install *PowerShell* file on the Hybrid Worker. See [Install PowerShell on Linux](/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.5).
105
-
106
-
After PowerShell 7.4 installation is complete, create an environment variable with **Variable name** as powershell_7_4_path and **Variable value** as location of the executable *PowerShell* file. Restart the Hybrid Runbook Worker after an environment variable is created successfully.
100
+
#### Extension-based Hybrid Workers
107
101
108
102
> [!NOTE]
109
103
> To create environment variable in Linux systems, follow these steps:
110
104
> 1. Open /etc/environment.
111
105
> 1. Create a new Environment variable by adding VARIABLE_NAME="variable_value" in a new line in /etc/environment (VARIABLE_NAME is the name of the new Environment variable and variable_value represents the value it is to be assigned).
112
106
> 1. Restart the VM or logout from current user and login after saving the changes to /etc/environment to implement environment variable changes.
113
107
108
+
**PowerShell 7.4**
109
+
110
+
To run PowerShell 7.4 runbooks on a Linux Hybrid Worker, install *PowerShell* file on the Hybrid Worker. See [Install PowerShell on Linux](/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.5).
111
+
112
+
After PowerShell 7.4 installation is complete, create an environment variable with **Variable name** as powershell_7_4_path and **Variable value** as location of the executable *PowerShell* file. Restart the Hybrid Runbook Worker after an environment variable is created successfully.
113
+
114
114
**PowerShell 7.2**
115
115
116
116
To run PowerShell 7.2 runbooks on a Linux Hybrid Worker, install *PowerShell* file on the Hybrid Worker. For more information, see [Install PowerShell on Linux](/powershell/scripting/install/installing-powershell-on-linux).
@@ -133,21 +133,6 @@ Ensure to add the executable *Python* file to the PATH environment variable and
133
133
To run Python 2.7 runbooks on a Linux Hybrid Worker, install *Python* on the Hybrid Worker.
134
134
Ensure to add the executable *Python* file to the PATH environment variable and restart the Hybrid Runbook Worker after the installation.
Create Service accounts **nxautomation** and **omsagent** for agent-based Hybrid Workers. The creation and permission assignment script can be viewed at [linux data](https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/datafiles/linux.data). The accounts, with the corresponding sudo permissions, must be present during [installation of a Linux Hybrid Runbook worker](automation-linux-hrw-install.md).
139
-
140
-
If you try to install the worker, and the account is not present or doesn't have the appropriate permissions, the installation fails. Do not change the permissions of the `sudoers.d` folder or its ownership. Sudo permission is required for the accounts and the permissions shouldn't be removed. Restricting this to certain folders or commands may result in a breaking change. The **nxautomation** user enabled as part of Update Management executes only signed runbooks.
141
-
142
-
To ensure the service accounts have access to the stored runbook modules:
143
-
144
-
- When you use `pip install`, `apt install` or other method for installing packages on Linux, ensure the package is installed for all users. For example `sudo -H pip install <package_name>`.
145
-
- If using [PowerShell on Linux](/powershell/scripting/whats-new/what-s-new-in-powershell-70), when you use the [Install-Module](/powershell/module/powershellget/install-module) cmdlet, be sure to specify `AllUsers` for the `Scope` parameter.
146
-
147
-
The Automation worker log is located at `/var/opt/microsoft/omsagent/run/automationworker/worker.log`.
148
-
149
-
---
150
-
151
136
## Configure runbook permissions
152
137
153
138
Define permissions for your runbook to run on the Hybrid Runbook Worker in the following ways:
0 commit comments