Skip to content

Commit 5b54319

Browse files
Content update
1 parent a63ddbb commit 5b54319

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

articles/automation/automation-hrw-run-runbooks.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ Jobs for Hybrid Runbook Workers run under the local **System** account.
4646
4747
#### Extension-based Hybrid Workers
4848

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-
5549
> [!NOTE]
5650
> To create environment variable in Windows systems, follow these steps:
5751
> 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
6054
> 1. Provide **Variable name** and **Variable value**, and then select **OK**.
6155
> 1. Restart the VM or logout from the current user and login to implement the environment variable changes.
6256
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+
6363
**PowerShell 7.2**
6464

6565
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
9797
>- 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.
9898
>- 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.
9999
100-
#### [Extension-based Hybrid Workers](#tab/Lin-extn-hrw)
101-
102-
**PowerShell 7.4**
103-
104-
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
107101

108102
> [!NOTE]
109103
> To create environment variable in Linux systems, follow these steps:
110104
> 1. Open /etc/environment.
111105
> 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).
112106
> 1. Restart the VM or logout from current user and login after saving the changes to /etc/environment to implement environment variable changes.
113107
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+
114114
**PowerShell 7.2**
115115

116116
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
133133
To run Python 2.7 runbooks on a Linux Hybrid Worker, install *Python* on the Hybrid Worker.
134134
Ensure to add the executable *Python* file to the PATH environment variable and restart the Hybrid Runbook Worker after the installation.
135135

136-
#### [Agent-based Hybrid Workers](#tab/Lin-agt-hrw)
137-
138-
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-
151136
## Configure runbook permissions
152137

153138
Define permissions for your runbook to run on the Hybrid Runbook Worker in the following ways:

0 commit comments

Comments
 (0)