mirror of
https://github.com/natelandau/ansible-homelab-config.git
synced 2025-11-17 01:13:40 -05:00
build: update dependencies
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# yamllint disable rule:indentation
|
||||
---
|
||||
# TASK DESCRIPTION:
|
||||
# Downloads, installs, and configures Hashicorp Consul.
|
||||
@@ -117,7 +118,7 @@
|
||||
|
||||
- name: "Create Consul /opt storage and copy certificates"
|
||||
block:
|
||||
- name: "Create {{ consul_opt_dir }} directories"
|
||||
- name: "Create {{ consul_opt_dir }} directories" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
@@ -130,16 +131,25 @@
|
||||
- "{{ consul_opt_dir }}/plugins"
|
||||
- "{{ consul_opt_dir }}/certs"
|
||||
|
||||
- name: Copy certs to servers
|
||||
- name: Copy certs to servers # noqa
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- { src: "certs/consul/consul-agent-ca.pem", dest: "{{ consul_opt_dir }}/certs/consul-agent-ca.pem" }
|
||||
- { src: "certs/consul/{{ datacenter_name }}-server-consul-0.pem", dest: "{{ consul_opt_dir }}/certs/{{ datacenter_name }}-server-consul-0.pem" }
|
||||
- { src: "certs/consul/{{ datacenter_name }}-server-consul-0-key.pem", dest: "{{ consul_opt_dir }}/certs/{{ datacenter_name }}-server-consul-0-key.pem" }
|
||||
- {
|
||||
src: "certs/consul/consul-agent-ca.pem",
|
||||
dest: "{{ consul_opt_dir }}/certs/consul-agent-ca.pem",
|
||||
}
|
||||
- {
|
||||
src: "certs/consul/{{ datacenter_name }}-server-consul-0.pem",
|
||||
dest: "{{ consul_opt_dir }}/certs/{{ datacenter_name }}-server-consul-0.pem",
|
||||
}
|
||||
- {
|
||||
src: "certs/consul/{{ datacenter_name }}-server-consul-0-key.pem",
|
||||
dest: "{{ consul_opt_dir }}/certs/{{ datacenter_name }}-server-consul-0-key.pem",
|
||||
}
|
||||
when:
|
||||
- is_consul_server
|
||||
|
||||
@@ -163,7 +173,7 @@
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }}"
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }}" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ consul_opt_dir }}"
|
||||
@@ -199,7 +209,7 @@
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }}"
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }}" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ interpolated_consul_configuration_dir }}"
|
||||
@@ -209,7 +219,7 @@
|
||||
when:
|
||||
- mac_intel or mac_arm or inventory_hostname == 'synology'
|
||||
|
||||
- name: "Set owner of root consul dir to {{ ansible_user_uid }}:{{ ansible_user_gid }} (synology)"
|
||||
- name: "Set owner of root consul dir to {{ ansible_user_uid }}:{{ ansible_user_gid }} (synology)" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /volume1/docker/consul/
|
||||
@@ -328,7 +338,7 @@
|
||||
- ansible_os_family == 'Debian'
|
||||
- "'nostart' not in ansible_run_tags"
|
||||
|
||||
- name: Make sure Consul service is really running
|
||||
- name: Make sure Consul service is really running # noqa: command-instead-of-module
|
||||
ansible.builtin.command:
|
||||
cmd: systemctl is-active consul
|
||||
register: is_consul_really_running
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# NOTE: This task exists due to the arillso.logrotate failing completely on macOS
|
||||
|
||||
- name: Add service_backups.log to logrotate
|
||||
- name: Add service_backups.log to logrotate # noqa: ignore-errors
|
||||
become: true
|
||||
vars:
|
||||
logrotate_applications:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# yamllint disable rule:indentation
|
||||
---
|
||||
# TASK DESCRIPTION:
|
||||
# Downloads, installs, and configures Hashicorp Nomad.
|
||||
@@ -83,7 +84,7 @@
|
||||
|
||||
- name: "Create Nomad /opt storage"
|
||||
block:
|
||||
- name: "Create {{ nomad_opt_dir_location }} directories"
|
||||
- name: "Create {{ nomad_opt_dir_location }} directories" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
@@ -102,9 +103,18 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- { src: certs/nomad/nomad-ca.pem, dest: "{{ nomad_opt_dir_location }}/certs/nomad-ca.pem" }
|
||||
- { src: certs/nomad/server.pem, dest: "{{ nomad_opt_dir_location }}/certs/server.pem" }
|
||||
- { src: certs/nomad/server-key.pem, dest: "{{ nomad_opt_dir_location }}/certs/server-key.pem" }
|
||||
- {
|
||||
src: certs/nomad/nomad-ca.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/nomad-ca.pem",
|
||||
}
|
||||
- {
|
||||
src: certs/nomad/server.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/server.pem",
|
||||
}
|
||||
- {
|
||||
src: certs/nomad/server-key.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/server-key.pem",
|
||||
}
|
||||
notify: "restart nomad"
|
||||
when: is_nomad_server
|
||||
|
||||
@@ -115,9 +125,18 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- { src: certs/nomad/nomad-ca.pem, dest: "{{ nomad_opt_dir_location }}/certs/nomad-ca.pem" }
|
||||
- { src: certs/nomad/client.pem, dest: "{{ nomad_opt_dir_location }}/certs/client.pem" }
|
||||
- { src: certs/nomad/client-key.pem, dest: "{{ nomad_opt_dir_location }}/certs/client-key.pem" }
|
||||
- {
|
||||
src: certs/nomad/nomad-ca.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/nomad-ca.pem",
|
||||
}
|
||||
- {
|
||||
src: certs/nomad/client.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/client.pem",
|
||||
}
|
||||
- {
|
||||
src: certs/nomad/client-key.pem,
|
||||
dest: "{{ nomad_opt_dir_location }}/certs/client-key.pem",
|
||||
}
|
||||
notify: "restart nomad"
|
||||
when: is_nomad_client
|
||||
|
||||
@@ -130,7 +149,7 @@
|
||||
recurse: true
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }} (MacOSX)"
|
||||
- name: "Set owner of files to {{ ansible_user_uid }}:{{ ansible_user_gid }} (MacOSX)" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ nomad_opt_dir_location }}"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ homebrew_output.unchanged_pkgs }}"
|
||||
|
||||
- name: Install homebrew casks
|
||||
- name: Install homebrew casks # noqa: ignore-errors
|
||||
community.general.homebrew_cask:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# yamllint disable rule:indentation
|
||||
---
|
||||
# TASK DESCRIPTION:
|
||||
# Downloads, installs, and configures Telegraf
|
||||
@@ -206,7 +207,7 @@
|
||||
|
||||
- name: "Configure Telegraf"
|
||||
block:
|
||||
- name: "Ensure {{ telegraph_config_location }} exists"
|
||||
- name: "Ensure {{ telegraph_config_location }} exists" # noqa: name[template]
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
@@ -223,10 +224,22 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "644"
|
||||
loop:
|
||||
- { src: "telegraf/base_config.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.conf" }
|
||||
- { src: "telegraf/custom_metrics.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/custom_metrics.conf" }
|
||||
- { src: "telegraf/nomad.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/nomad.conf" }
|
||||
- { src: "telegraf/docker.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/docker.conf" }
|
||||
- {
|
||||
src: "telegraf/base_config.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.conf",
|
||||
}
|
||||
- {
|
||||
src: "telegraf/custom_metrics.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/custom_metrics.conf",
|
||||
}
|
||||
- {
|
||||
src: "telegraf/nomad.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/nomad.conf",
|
||||
}
|
||||
- {
|
||||
src: "telegraf/docker.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/docker.conf",
|
||||
}
|
||||
notify: restart_telegraf
|
||||
|
||||
- name: Template leader configs (ie, configs that should be placed on a single server)
|
||||
@@ -236,9 +249,18 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "644"
|
||||
loop:
|
||||
- { src: "telegraf/leader.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/leader.conf" }
|
||||
- { src: "telegraf/speedtest.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/speedtest.conf" }
|
||||
- { src: "telegraf/pingHosts.conf.j2", dest: "{{ telegraph_config_location }}/telegraf.d/pingHosts.conf" }
|
||||
- {
|
||||
src: "telegraf/leader.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/leader.conf",
|
||||
}
|
||||
- {
|
||||
src: "telegraf/speedtest.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/speedtest.conf",
|
||||
}
|
||||
- {
|
||||
src: "telegraf/pingHosts.conf.j2",
|
||||
dest: "{{ telegraph_config_location }}/telegraf.d/pingHosts.conf",
|
||||
}
|
||||
when:
|
||||
- is_cluster_leader
|
||||
notify: restart_telegraf
|
||||
|
||||
Reference in New Issue
Block a user