Skip to content

Commit

Permalink
Retrieve HERA_USERNAME to set ssh username
Browse files Browse the repository at this point in the history
  • Loading branch information
rpelisse committed Feb 26, 2024
1 parent 32b747b commit 2c138c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/eris_hera_create/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
hera_debug: "{{ lookup('env', 'HERA_DEBUG') | default(False) }}"
podman_image: "{{ lookup('ansible.builtin.env', 'HERA_MOLECULE_SLAVE_IMAGE') | default('podman_image', 'localhost/molecule-slave-9') }}"
hera_ssh_username: "{{ lookup('ansible.builtin.env', 'HERA_USERNAME') | default('jenkins', 'jenkins') }}"
hera_molecule_slave_sshd_port: "{{ lookup('env', 'BUILD_MOLECULE_SLAVE_SSHD_PORT') | default('undefined') }}"
workdir: "{{ lookup('env', 'WORKDIR') }}"
job_name: "{{ lookup('env', 'JOB_NAME') | default('ansible') }}-slave"
Expand Down
2 changes: 1 addition & 1 deletion roles/eris_hera_create/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- name: "Set hera_created_instances"
ansible.builtin.set_fact:
hera_created_instances:
- { address: 'olympus', user: 'root', port: "{{ hera_molecule_slave_sshd_port }}", identity_file: '/var/jenkins_home/.ssh/id_rsa' }
- { address: 'olympus', user: "{{ hera_ssh_username }}", port: "{{ hera_molecule_slave_sshd_port }}", identity_file: '/var/jenkins_home/.ssh/id_rsa' }

- name: "Display hera run stdout"
ansible.builtin.debug:
Expand Down

0 comments on commit 2c138c9

Please sign in to comment.