Skip to content

Commit b6d63ed

Browse files
authored
Fixes to ansible roles (#3479)
- 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 PBENCH-1129
1 parent 9008b1e commit b6d63ed

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

agent/ansible/ansible-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
skip_list:
3-
- experimental # all rules tagged as experimental
4-
- no-changed-when # Commands should not change things if nothing needs doing.
3+
- experimental # all rules tagged as experimental
4+
- no-changed-when # Commands should not change things if nothing needs doing.
5+
- package-latest # Do not complain about using `latest'

agent/ansible/collection/galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace: pbench
1010
name: agent
1111

1212
# The version of the collection. Must be compatible with semantic versioning
13-
version: 1.0.7
13+
version: 1.0.11
1414

1515
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1616
readme: README.md

agent/ansible/collection/roles/pbench_agent_install/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
- name: Install RPMs
77
ansible.builtin.package:
8-
name: "{{ item }}"
9-
with_items:
10-
- pbench-agent
11-
- pbench-sysstat
8+
name:
9+
- pbench-agent
10+
- pbench-sysstat
11+
state: latest

agent/ansible/collection/roles/pbench_repo_install/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717

1818
- tag: "{{ pbench_aux_repo_name }}"
1919
user: "{{ fedoraproject_username }}"
20-
baseurl: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/{{distrodir}}"
20+
baseurl: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/{{ distrodir }}"
2121
gpgkey: "{{ pbench_repo_url_prefix }}/{{ pbench_aux_repo_name }}/pubkey.gpg"
2222
gpgcheck: 1
2323
enabled: "{{ enable_copr_aux_repo }}"

agent/ansible/collection/roles/pbench_repo_install/tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
# Install pbench.repo
33
- name: Assert pbench_repo_name is defined
4-
assert:
4+
ansible.builtin.assert:
55
that:
66
- pbench_repo_name is defined
77
fail_msg: "Please specify the COPR repository name to use in the `pbench_repo_name` variable"
8+
quiet: true
89

910
- name: Ensure we have the pbench.repo file properly in place
1011
ansible.builtin.template:

agent/ansible/collection/roles/pbench_repo_install/templates/etc/yum.repos.d/pbench.repo.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% for repo in repos %}
22

3-
[copr-{{ repo.name }}-{{ repo.user }}]
4-
name=COPR {{ repo.name }} ({{ repo.user }}) repo
3+
[copr-{{ repo.tag }}-{{ repo.user }}]
4+
name=COPR {{ repo.tag }} ({{ repo.user }}) repo
55
baseurl={{ repo.baseurl }}
66
gpgcheck={{ repo.gpgcheck }}
77
gpgkey={{ repo.gpgkey }}

0 commit comments

Comments
 (0)