Running Ansible in Check/Dry Run

Problem:
We are running Ansible through Foreman and it is working well. We have several servers that were deployed prior to us implementing Ansible that we want to bring under Ansible management. We also want to be able to use the Foreman/Ansible setup to report against changes in the environment without actually making any changes, basically run Ansible in ‘check’ or ‘dry’ run mode. I’ve been looking through the Foreman Job setup and don’t really see any place where we can amend or pass arguments to the playbook command. Is there a current interface where we can do this? Is there a formal process that we can use for creating a new job that will provide different parameters? At first we are trying to copy the [Ansible Roles - Ansible Default] Job Template.

Foreman and Proxy versions:
Foreman 1.24

Distribution and version:
CentOS 7.x

Hi,
this feature has been added only recently and will be available in Foreman 2.5. Users can turn the check mode on/off for specific hosts by providing a host parameter:

1 Like