Skip to content

Commit 2dd5552

Browse files
committed
Minor cleanup release
1 parent 6f0c094 commit 2dd5552

File tree

6 files changed

+47
-21
lines changed

6 files changed

+47
-21
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.8.3
2+
3+
- Clean up task items for best practices
4+
- Update documentation
5+
16
## v1.8.2
27

38
- Nomad v0.9.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ in a development environment based on Vagrant and VirtualBox. See
1717
This role requires a Debian, RHEL, or Ubuntu distribution; the role is tested
1818
with the following specific software versions:
1919

20-
* Ansible: 2.6.4
20+
* Ansible: 2.7.10
2121
* nomad: 0.9.0
2222
* CentOS: 7
2323
* Debian: 8

examples/README_VAGRANT.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ BOX_NAME="centos/7" vagrant up
8282

8383
## Notes
8484

85-
0. This project functions with the following software versions:
86-
* nomad version 0.8.4
87-
* Ansible version 2.6.0
85+
1. This project functions with the following software versions:
86+
* nomad version 0.9.0
87+
* Ansible version 2.7.10
8888
* VirtualBox version 5.2.12
8989
* Vagrant version 2.1.2
9090
* Vagrant Hosts version 2.8.1
91-
1. This project uses Debian 8 (Jessie) by default, but you can choose other OS
91+
2. This project uses Debian 8 (Jessie) by default, but you can choose other OS
9292
with the *BOX_NAME* environment variable
93-
2. The `bin/preinstall` shell script performs the following actions for you:
93+
3. The `bin/preinstall` shell script performs the following actions for you:
9494
* Adds each node's host information to the host machine's `/etc/hosts`
9595
* Optionally installs the Vagrant hosts plugin
96-
3. If you see an error like *vm: The '' provisioner could not be found.*
96+
4. If you see an error like *vm: The '' provisioner could not be found.*
9797
make sure you have vagrant-hosts plugin installed
9898

9999
## References

tasks/install.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,66 @@
99
tags: installation
1010

1111
- name: Check Nomad package checksum file
12-
local_action: stat path="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
12+
stat:
13+
path: "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
1314
become: false
1415
run_once: true
1516
tags: installation
1617
register: nomad_checksum
18+
delegate_to: 127.0.0.1
1719

1820
- name: Get Nomad package checksum file
19-
local_action: get_url url="{{ nomad_checksum_file_url }}" dest="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
21+
get_url:
22+
url: "{{ nomad_checksum_file_url }}"
23+
dest: "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
2024
become: false
2125
run_once: true
2226
tags: installation
23-
when: nomad_checksum.stat.exists == False
27+
when: not nomad_checksum.stat.exists
28+
delegate_to: 127.0.0.1
2429

2530
- name: Get Nomad package checksum
26-
local_action: shell grep "{{ nomad_pkg }}" "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" | awk '{print $1}'
31+
shell: grep "{{ nomad_pkg }}" "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" | awk '{print $1}'
2732
become: false
2833
register: nomad_sha256
2934
tags: installation
35+
delegate_to: 127.0.0.1
3036

3137
- name: Check Nomad package file
32-
local_action: stat path="{{ role_path }}/files/{{ nomad_pkg }}"
38+
stat:
39+
path: "{{ role_path }}/files/{{ nomad_pkg }}"
3340
become: false
3441
register: nomad_package
42+
delegate_to: 127.0.0.1
3543

3644
- name: Download Nomad
37-
local_action: get_url url="{{ nomad_zip_url }}" dest="{{ role_path }}/files/{{ nomad_pkg }}" checksum="sha256:{{ nomad_sha256.stdout }}" timeout="42"
45+
get_url:
46+
url: "{{ nomad_zip_url }}"
47+
dest: "{{ role_path }}/files/{{ nomad_pkg }}"
48+
checksum: "sha256:{{ nomad_sha256.stdout }}"
49+
timeout: "42"
3850
become: false
3951
tags: installation
40-
when: nomad_package.stat.exists == False
52+
delegate_to: 127.0.0.1
53+
when: not nomad_package.stat.exists
4154

4255
- name: Create Temporary Directory for Extraction
43-
local_action:
44-
module: tempfile
56+
tempfile:
4557
state: directory
4658
prefix: ansible-nomad.
4759
become: false
4860
register: install_temp
4961
tags: installation
62+
delegate_to: 127.0.0.1
5063

5164
- name: Unarchive Nomad
52-
local_action: unarchive src="{{ role_path }}/files/{{ nomad_pkg }}" dest="{{ install_temp.path }}/" creates="{{ install_temp.path }}/nomad"
65+
unarchive:
66+
src: "{{ role_path }}/files/{{ nomad_pkg }}"
67+
dest: "{{ install_temp.path }}/"
68+
creates: "{{ install_temp.path }}/nomad"
5369
become: false
5470
tags: installation
71+
delegate_to: 127.0.0.1
5572

5673
- name: Install Nomad
5774
copy:
@@ -63,6 +80,9 @@
6380
tags: installation
6481

6582
- name: Cleanup
66-
local_action: file path="{{ install_temp.path }}" state="absent"
83+
file:
84+
path: "{{ install_temp.path }}"
85+
state: "absent"
6786
become: false
6887
tags: installation
88+
delegate_to: 127.0.0.1

tasks/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
dest: "{{ item }}"
4444
state: directory
4545
owner: "{{ nomad_user }}"
46-
group: "{{ nomad_group}}"
46+
group: "{{ nomad_group }}"
4747
with_items:
4848
- "{{ nomad_data_dir }}"
4949
- "{{ nomad_log_dir }}"
@@ -130,7 +130,8 @@
130130
when: ansible_service_mgr == "systemd"
131131

132132
- name: reload systemd daemon
133-
shell: systemctl daemon-reload
133+
systemd:
134+
daemon_reload: true
134135
when: ansible_service_mgr == "systemd"
135136

136137
- name: Start Nomad

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.8.2
1+
v1.8.3

0 commit comments

Comments
 (0)