Ansible/roles/geerlingguy.jenkins/molecule/default/playbook-jenkins-version.yml

28 lines
597 B
YAML
Raw Normal View History

---
- name: Converge
hosts: all
become: true
vars:
jenkins_version: "1.644"
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"