diff options
author | Peter Mikus <pmikus@cisco.com> | 2022-07-07 10:31:16 +0000 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2022-07-07 13:11:37 +0000 |
commit | 2720dc186a1e488833533bfa8e14bfaa578aabca (patch) | |
tree | 18f2f75ab8409c20ac500c657fad64168cff5914 /fdio.infra.ansible/roles/consul | |
parent | 9f603617b10a447c59cd17110a89f67a1bf42d6e (diff) |
feat(ansible): Migrate Ubuntu Jammy II
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I43c86ab3232a382e7cc9010fb04a0ca269b24e77
Diffstat (limited to 'fdio.infra.ansible/roles/consul')
4 files changed, 18 insertions, 13 deletions
diff --git a/fdio.infra.ansible/roles/consul/defaults/main.yaml b/fdio.infra.ansible/roles/consul/defaults/main.yaml index 13bba8b144..503857de92 100644 --- a/fdio.infra.ansible/roles/consul/defaults/main.yaml +++ b/fdio.infra.ansible/roles/consul/defaults/main.yaml @@ -24,7 +24,7 @@ consul_architecture_map: 32-bit: "386" 64-bit: "amd64" consul_architecture: "{{ consul_architecture_map[ansible_architecture] }}" -consul_version: "1.9.5" +consul_version: "1.12.2" consul_pkg: "consul_{{ consul_version }}_linux_{{ consul_architecture }}.zip" consul_zip_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/{{ consul_pkg }}" consul_force_update: false diff --git a/fdio.infra.ansible/roles/consul/handlers/main.yaml b/fdio.infra.ansible/roles/consul/handlers/main.yaml index d0e0c598a9..a88ae45d27 100644 --- a/fdio.infra.ansible/roles/consul/handlers/main.yaml +++ b/fdio.infra.ansible/roles/consul/handlers/main.yaml @@ -2,14 +2,14 @@ # file roles/consul/handlers/main.yaml - name: Restart Nomad - systemd: + ansible.builtin.systemd: daemon_reload: true enabled: true name: "nomad" state: "{{ nomad_restart_handler_state }}" - name: Restart Consul - systemd: + ansible.builtin.systemd: daemon_reload: true enabled: true name: "consul" diff --git a/fdio.infra.ansible/roles/consul/meta/main.yaml b/fdio.infra.ansible/roles/consul/meta/main.yaml index c848f67c7b..bc6d6a1c57 100644 --- a/fdio.infra.ansible/roles/consul/meta/main.yaml +++ b/fdio.infra.ansible/roles/consul/meta/main.yaml @@ -1,11 +1,6 @@ --- # file: roles/consul/meta/main.yaml -# desc: Install consul from stable branch and configure service. -# inst: Consul -# conf: ? -# info: 1.0 - added role - dependencies: [] galaxy_info: role_name: consul @@ -18,5 +13,6 @@ galaxy_info: - name: Ubuntu versions: - focal + - jammy galaxy_tags: - consul diff --git a/fdio.infra.ansible/roles/consul/tasks/main.yaml b/fdio.infra.ansible/roles/consul/tasks/main.yaml index 4e229714b7..1d6bcc0b0b 100644 --- a/fdio.infra.ansible/roles/consul/tasks/main.yaml +++ b/fdio.infra.ansible/roles/consul/tasks/main.yaml @@ -1,14 +1,22 @@ --- # file: roles/consul/tasks/main.yaml -- name: Install Dependencies +- name: Inst - Update Repositories Cache + apt: + update_cache: true + when: + - ansible_os_family == 'Debian' + tags: + - consul-inst-package + +- name: Inst - Dependencies apt: name: "{{ packages | flatten(levels=1) }}" state: "present" cache_valid_time: 3600 install_recommends: false when: - - ansible_distribution|lower == 'ubuntu' + - ansible_os_family == 'Debian' tags: - consul-inst-dependencies @@ -155,7 +163,7 @@ name: "systemd-resolved" state: "{{ systemd_resolved_state }}" when: - - nomad_service_mgr == "systemd" + - consul_service_mgr == "systemd" tags: - consul-conf @@ -170,8 +178,9 @@ - "Restart Consul" - "Restart Nomad" when: - - nomad_service_mgr == "systemd" + - consul_service_mgr == "systemd" tags: - consul-conf -- meta: flush_handlers +- name: Meta - Flush handlers + meta: flush_handlers |