mg
181da3c38a
keepass vars playbook jenkins java jenkins in inventory Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#80 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
27 lines
597 B
YAML
27 lines
597 B
YAML
---
|
|
- 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"
|