move the bulk to templates into the new roles
This change will help with organization throughout the stack. Change-Id: I2ad865db534ae1d377bbdecd4b421ee0fc802536 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
8d08863b42
commit
45df59ed7e
@ -64,8 +64,8 @@
|
||||
|
||||
- name: Drop apm-server conf file
|
||||
template:
|
||||
src: templates/apm-server.yml.j2
|
||||
dest: /etc/apm-server/apm-server.yml
|
||||
src: "apm-server.yml.j2"
|
||||
dest: "/etc/apm-server/apm-server.yml"
|
||||
notify:
|
||||
- Enable and restart apm server
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_elasticsearch_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_xpack_elasticsearch_output.yml.j2
|
@ -79,17 +79,15 @@
|
||||
- "/var/log/curator"
|
||||
- "/etc/curator"
|
||||
|
||||
- name: Drop curator conf file
|
||||
- name: Drop curator conf file(s)
|
||||
template:
|
||||
src: templates/curator.yml.j2
|
||||
dest: /var/lib/curator/curator.yml
|
||||
notify:
|
||||
- Enable and restart curator.timer
|
||||
|
||||
- name: Drop curator action file
|
||||
template:
|
||||
src: templates/curator-actions.yml.j2
|
||||
dest: /var/lib/curator/actions.yml
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- src: "curator.yml.j2"
|
||||
dest: /var/lib/curator/curator.yml
|
||||
- src: "curator-actions.yml.j2"
|
||||
dest: /var/lib/curator/actions.yml
|
||||
notify:
|
||||
- Enable and restart curator.timer
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
- name: Set elastic heap defaults
|
||||
set_fact:
|
||||
elastic_heap_size_default: "{{ _elastic_heap_size_default }}"
|
||||
elastic_log_rotate_path: "/var/log/{{ service_name }}"
|
||||
|
||||
- name: Configure systcl vm.max_map_count=262144 on container hosts
|
||||
sysctl:
|
||||
@ -165,5 +166,7 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- src: templates/jvm.options.j2
|
||||
dest: /etc/{{ service_name }}/jvm.options
|
||||
- src: "jvm.options.j2"
|
||||
dest: "/etc/{{ service_name }}/jvm.options"
|
||||
- src: "templates/logrotate.j2"
|
||||
dest: "/etc/logrotate.d/{{ service_name }}"
|
||||
|
@ -174,8 +174,8 @@
|
||||
|
||||
- name: Drop Filebeat conf file
|
||||
template:
|
||||
src: templates/filebeat.yml.j2
|
||||
dest: /etc/filebeat/filebeat.yml
|
||||
src: "filebeat.yml.j2"
|
||||
dest: "/etc/filebeat/filebeat.yml"
|
||||
notify:
|
||||
- Enable and restart filebeat
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_xpack_elasticsearch_output.yml.j2
|
@ -70,8 +70,8 @@
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
with_items:
|
||||
- src: templates/heartbeat.yml.j2
|
||||
dest: /etc/heartbeat/heartbeat.yml
|
||||
- src: "heartbeat.yml.j2"
|
||||
dest: "/etc/heartbeat/heartbeat.yml"
|
||||
notify:
|
||||
- Enable and restart heartbeat
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_xpack_elasticsearch_output.yml.j2
|
@ -112,8 +112,8 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- src: templates/journalbeat.yml.j2
|
||||
dest: /etc/journalbeat/journalbeat.yml
|
||||
- src: "journalbeat.yml.j2"
|
||||
dest: "/etc/journalbeat/journalbeat.yml"
|
||||
notify:
|
||||
- Enable and restart journalbeat
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -51,8 +51,8 @@
|
||||
|
||||
- name: Drop Nginx default conf file
|
||||
template:
|
||||
src: templates/nginx_default.j2
|
||||
dest: /etc/nginx/sites-available/default
|
||||
src: "nginx_default.j2"
|
||||
dest: "/etc/nginx/sites-available/default"
|
||||
notify:
|
||||
- Enable and restart services
|
||||
|
||||
@ -81,8 +81,8 @@
|
||||
|
||||
- name: Drop kibana conf file
|
||||
template:
|
||||
src: templates/kibana.yml.j2
|
||||
dest: /etc/kibana/kibana.yml
|
||||
src: "kibana.yml.j2"
|
||||
dest: "/etc/kibana/kibana.yml"
|
||||
mode: "0666"
|
||||
notify:
|
||||
- Enable and restart services
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
temp_dir: /var/lib/logstash/tmp
|
||||
logstash_pipelines: "{{lookup('template', 'templates/logstash-pipelines.yml.j2') }}"
|
||||
logstash_pipelines: "{{lookup('template', 'logstash-pipelines.yml.j2') }}"
|
||||
|
||||
# Set processor cores fact
|
||||
q_storage: "{{ (ansible_processor_cores | int) * (ansible_processor_threads_per_core | int) * 2 }}"
|
||||
|
@ -96,12 +96,10 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- src: templates/logstash.yml.j2
|
||||
dest: /etc/logstash/logstash.yml
|
||||
- src: templates/logstash-pipelines.yml.j2
|
||||
dest: /etc/logstash/pipelines.yml
|
||||
- src: "templates/logrotate.j2"
|
||||
dest: "/etc/logrotate.d/logstash"
|
||||
- src: "logstash.yml.j2"
|
||||
dest: "/etc/logstash/logstash.yml"
|
||||
- src: "logstash-pipelines.yml.j2"
|
||||
dest: "/etc/logstash/pipelines.yml"
|
||||
notify:
|
||||
- Enable and restart logstash
|
||||
tags:
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/logstash-pipelines.yml.j2
|
@ -230,8 +230,8 @@
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
with_items:
|
||||
- src: templates/metricbeat.yml.j2
|
||||
dest: /etc/metricbeat/metricbeat.yml
|
||||
- src: "metricbeat.yml.j2"
|
||||
dest: "/etc/metricbeat/metricbeat.yml"
|
||||
notify:
|
||||
- Enable and restart metricbeat
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_xpack_elasticsearch_output.yml.j2
|
@ -68,8 +68,8 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "0644"
|
||||
with_items:
|
||||
- src: templates/packetbeat.yml.j2
|
||||
dest: /etc/packetbeat/packetbeat.yml
|
||||
- src: "packetbeat.yml.j2"
|
||||
dest: "/etc/packetbeat/packetbeat.yml"
|
||||
notify:
|
||||
- Enable and restart packetbeat
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_beat_logging.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_kibana_setup.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_log_stash_output.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_dashboards.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_setup_template.yml.j2
|
@ -0,0 +1 @@
|
||||
../../../templates/_include_xpack_elasticsearch_output.yml.j2
|
@ -73,12 +73,10 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- src: templates/elasticsearch.yml.j2
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
- src: templates/jvm.options.j2
|
||||
dest: /etc/elasticsearch/jvm.options
|
||||
- src: templates/es-log4j2.properties.j2
|
||||
dest: /etc/elasticsearch/log4j2.properties
|
||||
- src: "elasticsearch.yml.j2"
|
||||
dest: "/etc/elasticsearch/elasticsearch.yml"
|
||||
- src: "es-log4j2.properties.j2"
|
||||
dest: "/etc/elasticsearch/log4j2.properties"
|
||||
notify:
|
||||
- Enable and restart elastic
|
||||
tags:
|
||||
@ -105,11 +103,6 @@
|
||||
group: "elasticsearch"
|
||||
mode: "0750"
|
||||
|
||||
- name: Create logrotate config
|
||||
template:
|
||||
src: "templates/logrotate.j2"
|
||||
dest: "/etc/logrotate.d/elasticsearch"
|
||||
|
||||
- include_tasks: "elasticsearch_nfs_setup.yml"
|
||||
when:
|
||||
- elastic_shared_fs_repos is defined
|
||||
|
@ -0,0 +1,6 @@
|
||||
{% include 'templates/systemd.general-overrides.conf.j2' %}
|
||||
|
||||
# This first line clears the source ExecStart
|
||||
ExecStart=
|
||||
# This runs our ExecStart as an override.
|
||||
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid
|
@ -0,0 +1 @@
|
||||
../../../templates/systemd.general-overrides.conf.j2
|
@ -1,18 +0,0 @@
|
||||
[Service]
|
||||
# This first line clears the source ExecStart
|
||||
ExecStart=
|
||||
# This runs our ExecStart as an override.
|
||||
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid
|
||||
|
||||
# This creates a specific slice to operate from. The accounting options give us
|
||||
# the ability to see resource usage through the `systemd-cgtop` command and
|
||||
# further isolate this service from the host machine.
|
||||
Slice=elastic.slice
|
||||
CPUAccounting=true
|
||||
BlockIOAccounting=true
|
||||
MemoryAccounting=true
|
||||
TasksAccounting=true
|
||||
|
||||
# Sandbox setup
|
||||
PrivateTmp=true
|
||||
PrivateDevices={{ ((ansible_os_family | lower) != "redhat") | lower }}
|
@ -111,7 +111,8 @@
|
||||
args:
|
||||
chdir: "src/{{ current_test_repo }}/elk_metrics_6x/tests"
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_service_mgr != 'systemd' or
|
||||
not (contianer_inventory | bool)
|
||||
|
||||
- name: Run environment setup
|
||||
become: yes
|
||||
@ -125,6 +126,7 @@
|
||||
chdir: "src/{{ current_test_repo }}/elk_metrics_6x/tests"
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
- contianer_inventory | bool
|
||||
|
||||
- name: Wait 15 seconds
|
||||
command: "sleep 15"
|
||||
|
Loading…
Reference in New Issue
Block a user