Skip to content

Commit

Permalink
Adapt ansible workflow to ansible tests
Browse files Browse the repository at this point in the history
Up to now the github workflow shipped its own runtime file. This file
was now dropped and the ansible playbook was adapted to match a bit more
the ansible playbook from the vagrant repository.
  • Loading branch information
Birger Schacht authored and Sebastian Wagner committed Aug 31, 2021
1 parent d21176c commit cbf5335
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 228 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/scripts/ansible-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,25 @@
owner: intelmq
group: intelmq

- name: Delete shipped runtime.yaml
file:
path: '/opt/intelmq/etc/runtime.yaml'
state: absent

- name: Copy runtime.conf
copy:
src: '/src/intelmq/.github/workflows/scripts/ansible-runtime.yaml'
dest: '/opt/intelmq/etc/runtime.yaml'
src: 'assets/runtime.conf'
dest: '/opt/intelmq/etc/runtime.conf'
owner: intelmq
group: intelmq
mode: '0664'
- name: Copy pipeline.conf
copy:
src: 'assets/pipeline.conf'
dest: '/opt/intelmq/etc/pipeline.conf'
owner: intelmq
group: intelmq
mode: '0664'
- name: Make sure redis is running
service:
state: started
Expand All @@ -71,6 +86,11 @@
debug:
msg: IntelMQ Version {{ intelmq_version }} and IntelMQ Major Version {{ intelmq_major_version }}

- name: Run configuration upgrade
command: intelmqctl upgrade-config -u v300_pipeline_file_removal -f
when:
intelmq_major_version == '3'

- name: Run CLI tests
include: "{{ item }}"
loop: "{{ query('fileglob', '/src/intelmq-vagrant/ansible/tasks/cli/*.yml') | sort }}"
225 changes: 0 additions & 225 deletions .github/workflows/scripts/ansible-runtime.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/scripts/ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
#
apt-get update -qq
apt-get install ansible python python3-apt -y
ansible-playbook --connection=local -i /src/intelmq-vagrant/ansible/inventory.yml /src/intelmq/.github/workflows/scripts/ansible-playbook.yml
cp /src/intelmq/.github/workflows/scripts/ansible-playbook.yml /src/intelmq-vagrant/ansible/playbook.yml
ansible-playbook --connection=local -i /src/intelmq-vagrant/ansible/inventory.yml /src/intelmq-vagrant/ansible/playbook.yml

0 comments on commit cbf5335

Please sign in to comment.