Skip to content

Commit

Permalink
Unify macro for Ruby code blocks (#3337)
Browse files Browse the repository at this point in the history
$ rg "source, Ruby"
$ rg "source,Ruby"
$ rg "source,ruby"

(cherry picked from commit f391481)

Reverted changes to
"guides/common/modules/proc_calling-the-api-in-ruby.adoc" due to merge
conflicts.
  • Loading branch information
maximiliankolb committed Oct 2, 2024
1 parent e34163c commit b7f2e7b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It does not handle dependencies between Puppet modules.

A _Puppetfile_ looks as follows:

[source,ruby]
[source, ruby]
----
forge "https://forge.puppet.com"
Expand Down
4 changes: 2 additions & 2 deletions guides/common/modules/ref_customizing-job-templates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This way you can combine templates, or create more specific templates from the g

The following template combines default templates to install and start the *nginx* service on clients:

[source, Ruby]
[source, ruby]
----
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => 'nginx' %>
<%= render_template 'Service Action - SSH Default', :action => 'start', :service_name => 'nginx' %>
Expand All @@ -16,7 +16,7 @@ The above template specifies parameter values for the rendered template directly
It is also possible to use the *input()* method to allow users to define input for the rendered template on job execution.
For example, you can use the following syntax:

[source, Ruby]
[source, ruby]
----
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => input("package") %>
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This procedure prevents {Project} from interpreting the disconnect exception upo

Create a new template as described in {ManagingHostsDocURL}setting-up-job-templates_managing-hosts[Setting up Job Templates], and specify the following string in the template editor:

[source, Ruby]
[source, ruby]
----
<%= render_template("Power Action - SSH Default", :action => "restart") %>
----
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 @@ -10,7 +10,7 @@ This example shows how to create a template called *Run Command - restorecon* th
Select *Default* to make the template available to all organizations.
Add the following text to the template editor:
+
[source, Ruby]
[source, ruby]
----
restorecon -RvF <%= input("directory") %>
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This template does not require user input on job execution, it will restore the

Create a new template as described in {ManagingHostsDocURL}setting-up-job-templates_managing-hosts[Setting up Job Templates], and specify the following string in the template editor:

[source, Ruby]
[source, ruby]
----
<%= render_template("Run Command - restorecon", :directory => "/home") %>
----

0 comments on commit b7f2e7b

Please sign in to comment.