This avoids an issue on OVH nodes where sudo does not work.
When trying to use sudo on these nodes we see:
sudo: unable to resolve host (none)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
path: "/home/{{ jenkins_user }}/.gitconfig"
owner: "{{ jenkins_user }}"
+ - name: Set Hostname with hostname command
+ sudo: yes
+ hostname:
+ name: "{{ ansible_hostname }}"
+
- name: ensure that the current host is in /etc/hosts. Yes this is a thing.
sudo: true
replace: