On Wed, Mar 21, 2018 at 04:08:26PM +0100, Andrea Bolognani wrote:
On Wed, 2018-03-21 at 15:52 +0100, Pavel Hrdina wrote:
> > - name: Enable Jenkins agent
> > @@ -39,4 +45,5 @@
> > enabled: yes
> > daemon_reload: yes
> > when:
> > + - jenkins_secret is defined
> > - ansible_service_mgr == 'systemd'
>
> Would it be possible to create a group of tasks that should be run
> only if "jenkins_secret is defined" and guard the whole group with
> that check?
We could use blocks:
http://docs.ansible.com/ansible/latest/playbooks_blocks.html
However, we're not using that feature anywhere and we might want
to use the 'name' keyword introduced in 2.3 along with it, so I
would skip this change for now and apply it more widely as part
of the port to Ansible 2.4.
Works for me.
Reviewed-by: Pavel Hrdina <phrdina(a)redhat.com>