[libvirt] [jenkins-ci PATCH 1/3] guests: Configure Jenkins agent based on secret availability

Andrea Bolognani abologna at redhat.com
Wed Mar 21 15:08:26 UTC 2018


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.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list