Skip to content

Commit

Permalink
TST: check if ansible finds files if we change directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Birger Schacht committed Aug 30, 2021
1 parent c9f3ec2 commit 1f29067
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 231 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ansible-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
- '.github/**'
pull_request:
branches: [develop, maintenance]
paths-ignore:
- '.github/**'

jobs:
build:
Expand Down
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
2 changes: 1 addition & 1 deletion intelmq/lib/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def v300_pipeline_file_removal(configuration, harmonization, dry_run, **kwargs):
if pipeline_file.exists():
pipelines = load_configuration(pipeline_file)
for bot in configuration:
if bot_id == 'global':
if bot['bot_id'] == 'global':
continue
if bot in pipelines:
if 'destination-queues' in pipelines[bot]:
Expand Down

0 comments on commit 1f29067

Please sign in to comment.