diff --git a/tasks/main.yml b/tasks/main.yml index 144ab0d..a1b996f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,6 +6,15 @@ - "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_os_family }}.yml" +- name: add hashicorp repo + get_url: + url: "https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo" + dest: '/etc/yum.repos.d/hashicorp.repo' + owner: root + group: root + mode: 0644 + when: ansible_os_family == "RedHat" + - name: install package package: name: "{{ nomad_os_package }}" diff --git a/vars/RedHat.yml b/vars/RedHat.yml new file mode 100644 index 0000000..9120968 --- /dev/null +++ b/vars/RedHat.yml @@ -0,0 +1,5 @@ +--- +nomad_os_package: + - nomad + +nomad_os_service: nomad