Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add running Ansible playbook in Foreman #2951

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 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,27 @@
[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.
* You have configured xref:Configuring_and_Setting_Up_Remote_Jobs_{context}[remote job execution].
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
* 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`.
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
. Click *Next*.
. Select the hosts on which you want to run the playbook.
. In the *playbook* field, paste the content of your Ansible playbook.
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
. Optional: Customize any advanced settings and schedule.
For more information, see xref:executing-a-remote-job_{context}[].
. Click *Run on selected hosts*.
Lennonka marked this conversation as resolved.
Show resolved Hide resolved

.Additional resources
* Alternatively, you can import Ansible playbooks from {SmartProxy}.
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
For more information, see:
** xref:importing-an-ansible-playbook-by-name_{context}[]
** xref:importing-all-available-ansible-playbooks_{context}[]
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -15,6 +15,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