Skip to content

Commit f3b4309

Browse files
committed
Nomad v0.8.6 and more
- Nomad v0.8.6 - Consistent boolean usage - Improve Consul bootstrapping (thanks @RodolpheFouquet) - Systemd daemon reload (thanks @mrvovanness) - Advertise ports (thanks @Tsuki) - Update CONTRIBUTORS
1 parent 25ab2f2 commit f3b4309

File tree

8 files changed

+39
-35
lines changed

8 files changed

+39
-35
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
## v1.8.0 (UNRELEASED)
1+
## v1.8.0
22

3+
- Nomad v0.8.6
4+
- Consistent boolean usage
35
- Improve Consul bootstrapping (thanks @RodolpheFouquet)
46
- Systemd daemon reload (thanks @mrvovanness)
7+
- Advertise ports (thanks @Tsuki)
58
- Update CONTRIBUTORS
69

710
## v1.7.9

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Thank you to all these fine folk for helping with ansible-nomad!
1313
- [@ccf](https://github.com/ccf)
1414
- [@RodolpheFouquet](https://github.com/RodolpheFouquet)
1515
- [@mrvovanness](https://github.com/mrvovanness)
16+
- [@Tsuki]https://github.com/Tsuki

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ 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.0
21-
* nomad: 0.8.4
20+
* Ansible: 2.6.4
21+
* nomad: 0.8.6
2222
* CentOS: 7
2323
* Debian: 8
2424
* RHEL: 7
@@ -35,7 +35,7 @@ The role defines most of its variables in `defaults/main.yml`:
3535
### `nomad_version`
3636

3737
- Nomad version to install
38-
- Default value: **0.8.3**
38+
- Default value: **0.8.6**
3939

4040
### `nomad_architecture_map`
4141

defaults/main.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# File: main.yml - Main default variables for nomad
33

44
## Core
5-
nomad_debug: no
5+
nomad_debug: false
66

77
### Package
8-
nomad_version: "{{ lookup('env','NOMAD_VERSION') | default('0.8.4', true) }}"
8+
nomad_version: "{{ lookup('env','NOMAD_VERSION') | default('0.8.6', true) }}"
99
nomad_architecture_map:
1010
amd64: amd64
1111
x86_64: amd64
@@ -27,28 +27,28 @@ nomad_log_dir: "/var/log/nomad"
2727
nomad_run_dir: "/var/run/nomad"
2828

2929
### System user and group
30-
nomad_manage_user: yes
30+
nomad_manage_user: true
3131
nomad_user: "root"
32-
nomad_manage_group: no
32+
nomad_manage_group: false
3333
nomad_group: "bin"
3434

3535
### Nomad settings
3636
nomad_datacenter: "dc1"
3737
nomad_region: "global"
3838
nomad_log_level: "INFO"
39-
nomad_syslog_enable: yes
39+
nomad_syslog_enable: true
4040
nomad_iface: "{{ lookup('env','NOMAD_IFACE') | default(ansible_default_ipv4.interface, true) }}"
4141
nomad_node_name: "{{ inventory_hostname_short }}"
4242
nomad_node_role: "{{ lookup('env','NOMAD_NODE_ROLE') | default('client', true) }}"
43-
nomad_leave_on_terminate: yes
44-
nomad_leave_on_interrupt: no
45-
nomad_disable_update_check: no
43+
nomad_leave_on_terminate: true
44+
nomad_leave_on_interrupt: false
45+
nomad_disable_update_check: false
4646

4747
#### Server settings
4848
nomad_retry_max: 0
49-
nomad_retry_join: no
49+
nomad_retry_join: false
5050
nomad_retry_interval: "30s"
51-
nomad_rejoin_after_leave: no
51+
nomad_rejoin_after_leave: false
5252
nomad_enabled_schedulers:
5353
- service
5454
- batch
@@ -61,7 +61,7 @@ nomad_encrypt: ""
6161

6262
#### Client settings
6363
nomad_node_class: ""
64-
nomad_no_host_uuid: no
64+
nomad_no_host_uuid: false
6565
nomad_max_kill_timeout: "30s"
6666
nomad_network_speed: 0
6767
nomad_cpu_total_compute: 0
@@ -91,7 +91,7 @@ nomad_ports:
9191
### Servers
9292
nomad_group_name: "nomad_instances"
9393
nomad_servers: "\
94-
{% if nomad_use_consul==False %}\
94+
{% if nomad_use_consul==false %}\
9595
{% set _nomad_servers = [] %}\
9696
{% for host in groups[nomad_group_name] %}\
9797
{% set _nomad_node_role = hostvars[host]['nomad_node_role'] | default('client', true) %}\
@@ -103,10 +103,10 @@ nomad_servers: "\
103103
{% else %}\
104104
[]\
105105
{% endif %}"
106-
nomad_gather_server_facts: no
106+
nomad_gather_server_facts: false
107107

108108
### Consul
109-
nomad_use_consul: False
109+
nomad_use_consul: false
110110
nomad_consul_address: "localhost:8500"
111111
nomad_consul_servers_service_name: "nomad-servers"
112112
nomad_consul_clients_service_name: "nomad-clients"
@@ -121,20 +121,20 @@ nomad_acl_replication_token: ""
121121
### Vault
122122
nomad_vault_enabled: "{{ lookup('env', 'NOMAD_VAULT_ENABLED') | default('no', true) }}"
123123
nomad_vault_address: "{{ vault_address | default('0.0.0.0', true) }}"
124-
nomad_vault_allow_unauthenticated: yes
124+
nomad_vault_allow_unauthenticated: true
125125
nomad_vault_create_from_role: ""
126126
nomad_vault_task_token_ttl: ""
127127
nomad_vault_ca_file: ""
128128
nomad_vault_ca_path: ""
129129
nomad_vault_cert_file: ""
130130
nomad_vault_key_file: ""
131131
nomad_vault_tls_server_name: ""
132-
nomad_vault_tls_skip_verify: no
132+
nomad_vault_tls_skip_verify: false
133133
nomad_vault_token: ""
134134

135135
### Docker
136136
nomad_docker_enable: "{{ lookup('env','NOMAD_DOCKER_ENABLE') | default('false', true) }}"
137-
nomad_docker_dmsetup: yes
137+
nomad_docker_dmsetup: true
138138

139139
### Tls
140140
nomad_ca_file: ""

tasks/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
apt:
99
pkg: dmsetup
1010
state: installed
11-
update_cache: yes
11+
update_cache: true
1212
cache_valid_time: 600
1313
register: dmsetup_result
1414
when:
@@ -26,4 +26,4 @@
2626
user:
2727
name: "{{ nomad_user }}"
2828
groups: docker
29-
append: yes
29+
append: true

tasks/install.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@
1010

1111
- name: Check Nomad package checksum file
1212
local_action: stat path="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
13-
become: no
13+
become: false
1414
run_once: true
1515
tags: installation
1616
register: nomad_checksum
1717

1818
- name: Get Nomad package checksum file
1919
local_action: get_url url="{{ nomad_checksum_file_url }}" dest="{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS"
20-
become: no
20+
become: false
2121
run_once: true
2222
tags: installation
2323
when: nomad_checksum.stat.exists == False
2424

2525
- name: Get Nomad package checksum
2626
local_action: shell grep "{{ nomad_pkg }}" "{{ role_path }}/files/nomad_{{ nomad_version }}_SHA256SUMS" | awk '{print $1}'
27-
become: no
27+
become: false
2828
register: nomad_sha256
2929
tags: installation
3030

3131
- name: Check Nomad package file
3232
local_action: stat path="{{ role_path }}/files/{{ nomad_pkg }}"
33-
become: no
33+
become: false
3434
register: nomad_package
3535

3636
- name: Download Nomad
3737
local_action: get_url url="{{ nomad_zip_url }}" dest="{{ role_path }}/files/{{ nomad_pkg }}" checksum="sha256:{{ nomad_sha256.stdout }}" timeout="42"
38-
become: no
38+
become: false
3939
tags: installation
4040
when: nomad_package.stat.exists == False
4141

@@ -44,13 +44,13 @@
4444
module: tempfile
4545
state: directory
4646
prefix: ansible-nomad.
47-
become: no
47+
become: false
4848
register: install_temp
4949
tags: installation
5050

5151
- name: Unarchive Nomad
5252
local_action: unarchive src="{{ role_path }}/files/{{ nomad_pkg }}" dest="{{ install_temp.path }}/" creates="{{ install_temp.path }}/nomad"
53-
become: no
53+
become: false
5454
tags: installation
5555

5656
- name: Install Nomad
@@ -64,5 +64,5 @@
6464

6565
- name: Cleanup
6666
local_action: file path="{{ install_temp.path }}" state="absent"
67-
become: no
67+
become: false
6868
tags: installation

tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
- name: Gather facts from other servers
1414
setup:
1515
delegate_to: "{{ item }}"
16-
delegate_facts: True
16+
delegate_facts: true
1717
with_items: "{{ nomad_servers | difference(play_hosts) }}"
18-
ignore_errors: yes
18+
ignore_errors: true
1919
when: nomad_gather_server_facts | bool
2020

2121
- name: Expose bind_address, advertise_address and node_role as facts
@@ -136,5 +136,5 @@
136136
- name: Start Nomad
137137
service:
138138
name: nomad
139-
enabled: yes
139+
enabled: true
140140
state: started

version.txt

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

0 commit comments

Comments
 (0)