Skip to content

Commit

Permalink
Fix github action provision.yml
Browse files Browse the repository at this point in the history
- Fix github action for vagrant provisioning
- Update tox to version 4.6.4
- Fix maven ansible role, wrong handler task names
  • Loading branch information
theodore86 committed Jul 17, 2023
1 parent 98f850b commit 41a3acb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- provisioners/**
- vagrant.yaml
- lib/**
- .github/workflows/provision.yaml
- .github/workflows/provision.yml
- requirements.d/ansible.txt
schedule:
- cron: "0 0 * * *"
Expand Down Expand Up @@ -37,12 +37,12 @@ jobs:
with:
yq-version: 'v4.28.1'

- name: 'Update vagrant.yaml ansible tags with all the existing in playbook'
- name: 'Update vagrant.yaml with all existing provisioner tags'
run: |
tags=$(yq ".[].roles[].tags" provisioners/ansible/playbook.yml)
tags="'${tags//[[:space:]]/"','"}'"
tags="[${tags}]"
yq '.":host".":provisioners".":ansible".":options".":tags" = env(tags)' -i vagrant.yaml
TAGS=$(yq ".[].roles[].tags" provisioners/ansible/playbook.yml)
TAGS="'${TAGS//[[:space:]]/"','"}'"
export TAGS="[${TAGS}]"
yq '.":host".":provisioners".":ansible".":options".":tags" = env(TAGS)' -i vagrant.yaml
- name: "Installation of Vagrant plugins"
run: |
Expand Down
6 changes: 3 additions & 3 deletions provisioners/ansible/roles/jvm/maven/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
- name: 'Check Maven installed version'
- name: 'Check maven installed version'
command: '{{ mvn_install_dir }}/bin/mvn --version'
changed_when: false
register: 'mvn_installed_version'

- name: 'Set Maven installed version'
- name: 'Set maven installed version'
set_fact:
mvn_existing_version: '{{ mvn_installed_version.stdout | regex_search(version_re, "\1") | first }}'
vars:
version_re: '^Apache Maven ((?:\d{1,}\.){2}\d{1,})'

- name: 'Verify Maven installed version'
- name: 'Verify maven installed version'
assert:
that:
- 'mvn_existing_version == mvn_version'
Expand Down
6 changes: 3 additions & 3 deletions provisioners/ansible/roles/jvm/maven/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
mvn_installed_version.rc != 0
or mvn_version != mvn_current_version
notify:
- 'Check installed version'
- 'Set installed version'
- 'Verify installed version'
- 'Check maven installed version'
- 'Set maven installed version'
- 'Verify maven installed version'
...
2 changes: 1 addition & 1 deletion provisioners/ansible/roles/python/tox/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
tox_dependencies:
- name: 'tox'
version: '3.25.0'
version: '4.6.4'
...

0 comments on commit 41a3acb

Please sign in to comment.