homeserver/Archiv/jenkins/geerlingguy.jenkins/molecule/default/jenkins-version.yml

28 lines
597 B
YAML
Raw Normal View History

2021-01-21 09:07:19 +01:00
---
- name: Converge
hosts: all
become: true
vars:
jenkins_version: "2.220"
roles:
- geerlingguy.java
- geerlingguy.jenkins
post_tasks:
- name: Check installed version of Jenkins.
command: rpm -q jenkins
args:
warn: false
changed_when: false
register: jenkins_rpm_version
tags: ['skip_ansible_lint']
- name: Print installed Jenkins package information.
debug: var=jenkins_rpm_version
- name: Fail if version doesn't match what we wanted.
fail:
when: "jenkins_version not in jenkins_rpm_version.stdout"