Skip to content

Commit

Permalink
Fix procedure for restorecon example templates
Browse files Browse the repository at this point in the history
(cherry picked from commit acc5351)
  • Loading branch information
maximiliankolb committed Sep 26, 2023
1 parent 5ba2564 commit dd6945b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,34 @@ This example shows how to run a job based on the template created in {ManagingHo
The job restores the SELinux context in all files under the `/home/` directory.

.Procedure
. In the {ProjectWebUI}, navigate to *Hosts* > *All Hosts* and select target hosts.
Select *Schedule Remote Job* from the *Select Action* list.
. In the *Job invocation* page, select the `Commands` job category and the `Run Command - restorecon` job template.
. Type `/home` in the *directory* field.
. Set *Schedule* to `Execute now`.
. Click *Submit*.
You are taken to the *Job invocation* page where you can monitor the status of job execution.
. In the {ProjectWebUI}, navigate to *Monitor* > *Jobs* and click *Run job*.
. Select *Commands* as *Job category* and *Run Command {endash} restorecon* as *Job template* and click *Next*.
. Select the hosts on which you want to run the job.
If you do not select any hosts, the job will run on all hosts you can see in the current context.
. In the *directory* field, provide a directory, for example `/home`, and click *Next*.
. Optional: To configure advanced settings for the job, fill in the *Advanced fields*.
To learn more about advanced settings, see xref:advanced-settings-in-the-job-wizard_{context}[].
When you are done entering the advanced settings or if it is not required, click *Next*.
. Schedule time for the job.
* To execute the job immediately, keep the pre-selected *Immediate execution*.
* To execute the job in future time, select *Future execution*.
* To execute the job on regular basis, select *Recurring execution*.
. Optional: If you selected future or recurring execution, select the *Query type*, otherwise click *Next*.
* *Static query* means that the job executes on the exact list of hosts that you provided.
* *Dynamic query* means that the list of hosts is evaluated just before the job is executed.
If you entered the list of hosts based on some filter, the results can be different from when you first used that filter.
+
Click *Next* after you have selected the query type.
. Optional: If you selected future or recurring execution, provide additional details:
* For *Future execution*, enter the *Starts at* date and time.
You also have the option to select the *Starts before* date and time.
If the job cannot start before that time, it will be canceled.
* For *Recurring execution*, select the start date and time, frequency, and condition for ending the recurring job.
You can choose the recurrence to never end, end at a certain time, or end after a given number of repetitions.
You can also add *Purpose* - a special label for tracking the job.
There can only be one active job with a given purpose at a time.
+
Click *Next* after you have entered the required information.
. Review job details.
You have the option to return to any part of the job wizard and edit the information.
. Click *Submit* to schedule the job for execution.
2 changes: 1 addition & 1 deletion guides/common/modules/ref_example-restorecon-template.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This example shows how to create a template called *Run Command - restorecon* th

.Procedure
. In the {ProjectWebUI}, navigate to *Hosts* > *Job templates*.
Click *New Job Template*.
. Click *New Job Template*.
. Enter *Run Command - restorecon* in the *Name* field.
Select *Default* to make the template available to all organizations.
Add the following text to the template editor:
Expand Down

0 comments on commit dd6945b

Please sign in to comment.