-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change working directory for REX in pull mode
Also fixed the default working directory, which is now `/run`. (cherry picked from commit 981af6f) (cherry picked from commit 51a93d9)
- Loading branch information
1 parent
141c3ef
commit 2725e1b
Showing
4 changed files
with
89 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
...roc_configuring-an-alternative-directory-to-execute-remote-jobs-on-clients.adoc
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...oc_setting-an-alternative-directory-for-remote-execution-jobs-in-pull-mode.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[id="setting-an-alternative-directory-for-remote-execution-jobs-in-pull-mode_{context}"] | ||
= Setting an Alternative Directory for Remote Execution Jobs in Pull Mode | ||
|
||
By default, {Project} uses the `/run` directory on hosts for remote execution jobs in pull mode. | ||
If the `/run` directory on your host is mounted with the `noexec` flag, {Project} cannot execute remote execution job scripts in this directory. | ||
You can use the `yggdrasild` service to set an alternative directory for executing remote execution jobs in pull mode. | ||
|
||
.Procedure | ||
On your host, perform these steps: | ||
|
||
. Create a new directory: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# mkdir _/My_Remote_Working_Directory_ | ||
---- | ||
. Access the `yggdrasild` service configuration: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# systemctl edit yggdrasild | ||
---- | ||
. Specify the alternative directory by adding the following line to the configuration: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
Environment=FOREMAN_YGG_WORKER_WORKDIR=_/My_Remote_Working_Directory_ | ||
---- | ||
. Restart the `yggdrasild` service: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# systemctl restart yggdrasild | ||
---- |
50 changes: 50 additions & 0 deletions
50
...oc_setting-an-alternative-directory-for-remote-execution-jobs-in-push-mode.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[id="setting-an-alternative-directory-for-remote-execution-jobs-in-push-mode_{context}"] | ||
ifeval::["{context}" == "managing-hosts"] | ||
= Setting an Alternative Directory for Remote Execution Jobs in Push Mode | ||
|
||
By default, {Project} uses the `/var/tmp` directory on hosts for remote execution jobs in push mode. | ||
If the `/var/tmp` directory on your host is mounted with the `noexec` flag, {Project} cannot execute remote execution job scripts in this directory. | ||
You can use `{foreman-installer}` to set an alternative directory for executing remote execution jobs in push mode. | ||
|
||
:rex-default-working-dir: /var/tmp | ||
:installer-change-working-dir-opt: --foreman-proxy-plugin-remote-execution-script-remote-working-dir | ||
:rex-target-machine: host | ||
endif::[] | ||
ifeval::["{context}" == "ansible"] | ||
= Configuring {Project} to Use an Alternative Directory to Execute Remote Jobs on Hosts | ||
|
||
Ansible puts its own files it requires on the server side into the `/tmp` directory. | ||
You have the option to set a different directory if required. | ||
|
||
:rex-default-working-dir: /tmp | ||
:installer-change-working-dir-opt: --foreman-proxy-plugin-ansible-working-dir | ||
:rex-target-machine: {ProjectServer} or {SmartProxyServer} | ||
endif::[] | ||
|
||
.Procedure | ||
. On your {rex-target-machine}, create a new directory: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# mkdir _/My_Remote_Working_Directory_ | ||
---- | ||
ifndef::foreman-deb[] | ||
+ | ||
. Copy the SELinux context from the default `{rex-default-working-dir}` directory: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# chcon --reference={rex-default-working-dir} _/My_Remote_Working_Directory_ | ||
---- | ||
endif::[] | ||
. Configure your {ProjectServer} or {SmartProxyServer} to use the new directory: | ||
+ | ||
[options="nowrap", subs="+quotes,verbatim,attributes"] | ||
---- | ||
# {foreman-installer} \ | ||
{installer-change-working-dir-opt} _/My_Remote_Working_Directory_ | ||
---- | ||
|
||
:!rex-default-working-dir: | ||
:!installer-change-working-dir-opt: | ||
:!rex-target-machine: |