Skip to content

Commit

Permalink
Add motd on controller-0
Browse files Browse the repository at this point in the history
This should provide some usefull environment information whenever a user
connects to the controller-0.
  • Loading branch information
cjeanner authored and openshift-merge-bot[bot] committed Sep 5, 2024
1 parent 332342c commit a2ce6eb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/reproducer/molecule/crc_layout/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
ansible.builtin.shell: # noqa: command-instead-of-module
cmd: |-
rsync -r zuul@controller-0:"*.log" {{ _log_dest }};
rsync -r zuul@controller-0:/etc/motd.d {{ _log_dest }};
rsync -r --exclude "**/venv" --exclude "**/tmp" \
--exclude "**/install_yamls_makes" \
zuul@controller-0:ci-framework-data {{ _log_dest }};
7 changes: 7 additions & 0 deletions roles/reproducer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@
- name: Group tasks on controller-0
delegate_to: controller-0
block:
- name: Inject CI Framework motd
become: true
ansible.builtin.template:
dest: "/etc/motd.d/cifmw.motd"
src: "motd.j2"
mode: "0644"

- name: Rotate some logs
tags:
- always
Expand Down
16 changes: 16 additions & 0 deletions roles/reproducer/templates/motd.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% if zuul.job is defined %}
Zuul job: {{ zuul.job }}
Change URL: {{ zuul.change_url }}
{% else %}
Development environment not started by Zuul
{% endif %}

Custom repositories:
{% for repo in cifmw_reproducer_repositories %}
{{ repo.src }} in {{ repo.dest }} at {{ repo.refspec | default(repo.version | default('HEAD')) }}
{% endfor %}

Default repositories (might get overridden by above list):
{% for repo in cifmw_reproducer_default_repositories %}
{{ repo.src }} in {{ repo.dest }} at {{ repo.refspec | default(repo.version | default('HEAD')) }}
{% endfor %}

0 comments on commit a2ce6eb

Please sign in to comment.