Description
Hi,
I would like to be able to start and stop FreeBSD jails with ansible.
Provided jail host's rc.conf
contains jail_enable="YES"
, all the jails declared in host's jail.conf
can be started with service jail start
, which translates to the following playbook:
- name: 'Starting Jail'
service:
name: jail
state: started
Particular jail can be started with service jail start myjail
, which - I guess - should translate to:
- name: 'Starting Jail'
service:
name: jail
state: started
args: myjail
However, this doesn't work, possibly because argument comes before command, which means this translates back to incorrect service jail myjail start
instead of correct service jail start myjail
.
Is there a way to achieve my goal of starting single jail differently? Or should service module for FreeBSD be changed so that args come after command, not before? Or perhaps new property, such as afterargs
is needed?
Thank you in advance,