Skip to content

Commit

Permalink
Review introductions to template sync procedures (#3428)
Browse files Browse the repository at this point in the history
* Update intros to template sync procedures
* Simplify template sync assembly structure
* Add Ansible module reference for importing templates

---------

Co-authored-by: Adam Lazik <[email protected]>
  • Loading branch information
asteflova and adamlazik1 authored Nov 7, 2024
1 parent 791ed62 commit 3b7c7d9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 25 deletions.
12 changes: 4 additions & 8 deletions guides/common/assembly_synchronizing-template-repositories.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ ifndef::satellite[]
include::modules/proc_enabling-the-template-sync-plugin.adoc[leveloffset=+1]
endif::[]

include::modules/con_using-repository-sources.adoc[leveloffset=+1]
include::modules/proc_synchronizing-templates-with-an-existing-repository.adoc[leveloffset=+1]

include::modules/proc_synchronizing-templates-with-an-existing-repository.adoc[leveloffset=+2]
include::modules/proc_synchronizing-templates-with-a-local-directory.adoc[leveloffset=+1]

include::modules/proc_synchronizing-templates-with-a-local-directory.adoc[leveloffset=+2]
include::modules/proc_importing-templates.adoc[leveloffset=+1]

include::modules/con_importing-and-exporting-templates.adoc[leveloffset=+1]

include::modules/proc_importing-templates.adoc[leveloffset=+2]

include::modules/proc_exporting-templates.adoc[leveloffset=+2]
include::modules/proc_exporting-templates.adoc[leveloffset=+1]

ifndef::satellite[]
include::modules/proc_uninstalling-the-foreman-templates-plugin.adoc[leveloffset=+1]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
= Synchronizing template repositories

In {Project}, you can synchronize repositories of job templates, provisioning templates, report templates, and partition table templates between {ProjectServer} and a version control system or local directory.
In this chapter, a Git repository is used for demonstration purposes.

This section details the workflow for installing and configuring the Template Sync plugin and performing exporting and importing tasks.
4 changes: 0 additions & 4 deletions guides/common/modules/con_using-repository-sources.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion guides/common/modules/proc_exporting-templates.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[id="Exporting_Templates_{context}"]
= Exporting templates

Use this procedure to export templates to a git repository.
You can export templates to an existing repository.

To use the CLI instead of the {ProjectWebUI}, see the xref:cli_Exporting_Templates_{context}[].
To use the API, see the xref:api_Exporting_Templates_{context}[].
Expand Down
7 changes: 7 additions & 0 deletions guides/common/modules/proc_importing-templates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ organizations:

To use the CLI instead of the {ProjectWebUI}, see the xref:cli_Importing_Templates_{context}[].
To use the API, see the xref:api_Importing_Templates_{context}[].
To use Ansible, see the xref:ansible_Importing_Templates_{context}[].

.Procedure
. In the {ProjectWebUI}, navigate to *Hosts* > *Templates* > *Sync Templates*.
Expand Down Expand Up @@ -79,3 +80,9 @@ For example `--filter '.*Ansible Default$'` imports various Ansible Default temp
----
+
If the import is successful, you receive `{"message":"Success"}`.

[id="ansible_Importing_Templates_{context}"]
.Ansible procedure
* Use the `{ansible-namespace}.templates_import` module.

For more information, see the Ansible module documentation with `ansible-doc {ansible-namespace}.templates_import`.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[id="Synchronizing_Templates_with_a_Local_Directory_{context}"]
= Synchronizing templates with a local directory

Synchronizing templates with a local directory is useful if you have configured a version control repository in the local directory.
That way, you can edit templates and track the history of edits in the directory.
You can also synchronize changes to {ProjectServer} after editing the templates.
If you store templates in a local directory that is tracked under a version control system, you can synchronize the templates between your {ProjectServer} and the local directory.

.Prerequisites
* Each template must contain the location and organization that the template belongs to.
Expand All @@ -28,7 +26,7 @@ organizations:
----

.Procedure
. In `/var/lib/foreman`, create a directory for storing templates:
. On your {ProjectServer}, in `/var/lib/foreman`, create a directory for storing templates:
+
[subs="+quotes"]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[id="synchronizing-templates-with-an-existing-repository_{context}"]
= Synchronizing templates with an existing repository

Use this procedure to synchronize templates between your {ProjectServer} and an existing repository.
If you store templates in a repository under a version control system, you can synchronize the templates between your {ProjectServer} and the repository.

In this procedure, a Git repository is used for demonstration purposes.

.Procedure
. If you want to use HTTPS to connect to the repository and you use a self-signed certificate authority (CA) on your Git server:
Expand Down

0 comments on commit 3b7c7d9

Please sign in to comment.