Skip to content

Commit

Permalink
remove unused file and fix redhat
Browse files Browse the repository at this point in the history
  • Loading branch information
tanganellilore authored Jun 4, 2024
1 parent 5dad50c commit 96f4a40
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
12 changes: 0 additions & 12 deletions roles/setup/tasks/check_installed_version.yml

This file was deleted.

18 changes: 14 additions & 4 deletions roles/setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ansible.builtin.set_fact:
additional_python_packages: "{{ additional_python_packages + ['receptorctl'] }}"
when:
- receptor_install_method in ['release','update-release', 'local','update-local']
- receptor_install_method in ['release', 'update-release', 'local','update-local']
- "'receptorctl' not in additional_python_packages"

- name: Install python packages
Expand All @@ -30,8 +30,18 @@
ansible.builtin.include_tasks: setup-release.yml
when: receptor_install_method in ['release', 'update-release']

- name: Receptor check installation
ansible.builtin.include_tasks: check_installed_version.yml
- name: Check if receptor was installed correctly
ansible.builtin.command: "receptor --version"
changed_when: false
register: receptor_version
ignore_errors: true

- name: Assert receptor installation
ansible.builtin.assert:
that:
- receptor_version.rc == 0
fail_msg: "Receptor not installed correctly. Please check the installation or reinstall it with local_receptor: true"
success_msg: "Receptor installed correctly"

- name: Configuration tasks during fisrt installation
when: "'update' not in receptor_install_method"
Expand All @@ -52,7 +62,7 @@

- name: Setup systemd
ansible.builtin.include_tasks: setup-service.yml
when: receptor_install_method in ['release', 'local']
when: receptor_install_method in ['release', 'local', 'update-release', 'local','update-local']

- name: Start Receptor service
ansible.builtin.systemd:
Expand Down
4 changes: 0 additions & 4 deletions roles/setup/tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
ansible.builtin.assert:
that: receptor_local_bin_file | length
when: receptor_install_method in ['local', 'update-local']

Check failure on line 5 in roles/setup/tasks/preflight.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[colons]

Too many spaces after colon

- name: Receptor check installation
ansible.builtin.include_tasks: check_installed_version.yml
when: "'update' in receptor_install_method"
2 changes: 1 addition & 1 deletion roles/setup/tasks/setup-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
- name: Install dependencies specific to the node type
ansible.builtin.dnf:
name: "{{ additional_system_packages | default([]) }}"
state: present
state: "{{ 'latest' if 'update' in receptor_install_method else 'present' }}"

0 comments on commit 96f4a40

Please sign in to comment.