Skip to content

Commit

Permalink
Add running Ansible playbook in Foreman (#2951)
Browse files Browse the repository at this point in the history
Co-authored-by: Aneta Šteflová Petrová <[email protected]>
Co-authored-by: Maximilian Kolb <[email protected]>
  • Loading branch information
3 people committed Apr 11, 2024
1 parent a7d0341 commit cd8029b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions guides/common/modules/proc_running-an-ansible-playbook.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[id="running-an-ansible-playbook-from-{project-context}_{context}"]
= Running an Ansible playbook from {Project}

You can run an Ansible playbook on a host or host group by executing a remote job in {Project}.

.Prerequisites
* Ansible plugin in {Project} is enabled.
* Remote job execution is configured.
For more information, see xref:Configuring_and_Setting_Up_Remote_Jobs_{context}[].
* You have an Ansible playbook ready to use.

.Procedure
. In the {ProjectWebUI}, navigate to *Monitor* > *Jobs*.
. Click *Run Job*.
. In *Job category*, select `Ansible Playbook`.
. In *Job template*, select `Ansible - Run playbook`.
. Click *Next*.
. Select the hosts on which you want to run the playbook.
. In the *playbook* field, paste the content of your Ansible playbook.
. Follow the wizzard to complete setting the remote job.
For more information, see xref:executing-a-remote-job_{context}[].
. Click *Submit* to run the Ansible playbook on your hosts.

.Additional resources
* Alternatively, you can import Ansible playbooks from {SmartProxyServers}.
For more information, see the following resources:
** xref:importing-an-ansible-playbook-by-name_{context}[]
** xref:importing-all-available-ansible-playbooks_{context}[]
2 changes: 2 additions & 0 deletions guides/doc-Managing_Configurations_Ansible/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ include::common/assembly_getting-started-with-ansible.adoc[leveloffset=+1]

include::common/assembly_using-ansible-roles.adoc[leveloffset=+1]

include::common/modules/proc_running-an-ansible-playbook.adoc[leveloffset=+1]

include::common/assembly_configuring-and-setting-up-remote-jobs.adoc[leveloffset=+1]

include::common/assembly_integrating-awx.adoc[leveloffset=+1]
Expand Down

0 comments on commit cd8029b

Please sign in to comment.