Skip to content

Commit

Permalink
Fixes to ansible roles
Browse files Browse the repository at this point in the history
- repo.name -> repo.tag

- assert that `pbench_repo_name' is defined (users have to define it
  in their inventory)

- use `latest' when installing packages and stop ansible-lint from
  complaining about it
  • Loading branch information
ndokos committed Jul 4, 2023
1 parent 7d5defa commit fea91c8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions agent/ansible/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
skip_list:
- experimental # all rules tagged as experimental
- no-changed-when # Commands should not change things if nothing needs doing.
- experimental # all rules tagged as experimental
- no-changed-when # Commands should not change things if nothing needs doing.
- package-latest # Do not complain about using `latest'
2 changes: 1 addition & 1 deletion agent/ansible/collection/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace: pbench
name: agent

# The version of the collection. Must be compatible with semantic versioning
version: 1.0.7
version: 1.0.11

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

- name: Install RPMs
ansible.builtin.package:
name: "{{ item }}"
with_items:
- pbench-agent
- pbench-sysstat
name:
- pbench-agent
- pbench-sysstat
state: latest
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:

- tag: "{{ pbench_aux_repo_name }}"
user: "{{ fedoraproject_username }}"
baseurl: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/{{distrodir}}"
baseurl: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/{{ distrodir }}"
gpgkey: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/pubkey.gpg"
gpgcheck: 1
enabled: "{{ enable_copr_aux_repo }}"
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
# Install pbench.repo
- name: Assert pbench_repo_name is defined
assert:
ansible.builtin.assert:
that:
- pbench_repo_name is defined
fail_msg: "Please specify the COPR repository name to use in the `pbench_repo_name` variable"
quiet: true

- name: Ensure we have the pbench.repo file properly in place
ansible.builtin.template:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% for repo in repos %}

[copr-{{ repo.name }}-{{ repo.user }}]
name=COPR {{ repo.name }} ({{ repo.user }}) repo
[copr-{{ repo.tag }}-{{ repo.user }}]
name=COPR {{ repo.tag }} ({{ repo.user }}) repo
baseurl={{ repo.baseurl }}
gpgcheck={{ repo.gpgcheck }}
gpgkey={{ repo.gpgkey }}
Expand Down

0 comments on commit fea91c8

Please sign in to comment.