-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document VCS integration in foreman_ansible plugin.
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
guides/common/modules/proc_cloning-ansible-roles-from-vcs.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,24 @@ | ||
[id="cloning-ansible-roles-from-vcs-{context}"] | ||
= Cloning Ansible roles from VCS | ||
|
||
You can clone Ansible roles to your {SmartProxy} from the {ProjectWebUI}. | ||
|
||
.Prerequisites | ||
* A {SmartProxy} with VSC integration for Ansible. | ||
For more information, see xref:setting-up-vsc-integration-for-ansible_{context}[]. | ||
|
||
.Procedure | ||
. In the {ProjectWebUI}, navigate to *Configure* > *Ansible* > *Roles* | ||
. Click on `Clone from VCS...` in the toolbar. | ||
Follow the wizard to clone an Ansible role from VCS. | ||
|
||
Note: Currently, only links using *HTTPS* are supported | ||
|
||
* Click *Examine* to select a git revision from the list of branches and tags. | ||
* Select *Skipping existing* to overwrite existing Ansible roles on your {SmartProxy}. | ||
. Click *Confirm* to clone your Ansible role from VCS to your {SmartProxy}. | ||
|
||
.Next steps | ||
* {Project} starts a task called `Clone Ansible role from VCS`. | ||
For more information, see {AdministeringDocURL}Managing_Tasks_admin[Managing Tasks] in _{AdministeringDocTitle}_. | ||
* Proceed with xref:Importing_Ansible_Roles_and_Variables_{context}[] after the task has finished successfully. |
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
46 changes: 46 additions & 0 deletions
46
guides/common/modules/proc_setting-up-ansible-vcs-integration.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,46 @@ | ||
[id="setting-up-vsc-integration-for-ansible_{context}"] | ||
= Setting up VCS integration for Ansible | ||
|
||
With VCS integration, you can clone Ansible roles from any remote git repository directly from the {ProjectWebUI}. | ||
|
||
.Procedure | ||
. Create the default directory: | ||
+ | ||
---- | ||
# mkdir -p /var/lib/foreman-proxy/ansible/roles | ||
---- | ||
. Assign the correct permissions: | ||
+ | ||
---- | ||
# chmod -R 060 /var/lib/foreman-proxy/ansible/roles | ||
---- | ||
. Add the directory to the group `foreman-proxy`: | ||
+ | ||
---- | ||
# chgrp -R foreman-proxy /var/lib/foreman-proxy/ansible/roles | ||
---- | ||
|
||
.Optional | ||
You may also choose a different directory to clone the roles into: | ||
|
||
* Create the directory: | ||
+ | ||
---- | ||
mkdir -p CUSTOM_DIRECTORY/ansible/roles | ||
---- | ||
* Assign the correct permissions and group as above | ||
* Pass `CUSTOM_DIRECTORY` to your {SmartProxy} via the environment variable `STATE_DIR` | ||
+ | ||
---- | ||
STATE_DIR=CUSTOM_DIRECTORY | ||
---- | ||
|
||
Finally, you need to enable `vcs_integration` in the {SmartProxy} settings | ||
|
||
.Procedure | ||
* Append the following line `/etc/foreman-proxy/settings.d/ansible.yml`: | ||
+ | ||
[source, yaml, options="nowrap", subs="verbatim,quotes,attributes"] | ||
---- | ||
:vcs_integration: true | ||
---- |