Fix the data directory permissions. Add the default template.
This commit is contained in:
parent
3b1391d355
commit
8418ba8dd8
|
@ -2,6 +2,28 @@
|
|||
- name: cassandra-configuration | Manage the Cassandra configuration
|
||||
tags: [cassandra, cassandra_conf, cassandra_service]
|
||||
block:
|
||||
- name: cassandra-configuration | Ensure that the data folders exist and have the proper permissions
|
||||
ansible.builtin.file:
|
||||
dest: "{{ item }}"
|
||||
state: directory
|
||||
owner: cassandra
|
||||
group: cassandra
|
||||
mode: "0750"
|
||||
loop:
|
||||
- "{{ cassandra_data_dir }}"
|
||||
- "{{ cassandra_data_dir }}/.cache"
|
||||
- "{{ cassandra_data_dir }}/commitlog"
|
||||
- "{{ cassandra_data_dir }}/data"
|
||||
- "{{ cassandra_data_dir }}/hints"
|
||||
- "{{ cassandra_data_dir }}/saved_caches"
|
||||
- name: cassandra-configuration | Install the default env file
|
||||
ansible.builtin.template:
|
||||
src: cassandra-default.j2
|
||||
dest: "/etc/default/cassandra"
|
||||
owner: root
|
||||
group: cassandra
|
||||
mode: "0640"
|
||||
notify: Restart Cassandra
|
||||
- name: cassandra-configuration | Install the main configuration file
|
||||
ansible.builtin.template:
|
||||
src: cassandra.yaml.j2
|
||||
|
@ -10,7 +32,6 @@
|
|||
group: cassandra
|
||||
mode: "0640"
|
||||
notify: Restart Cassandra
|
||||
|
||||
- name: cassandra-configuration | Install the rackdc configuration file
|
||||
ansible.builtin.template:
|
||||
src: cassandra-rackdc.properties.j2
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# NOTICE: See also /etc/cassandra/cassandra-env.sh
|
||||
|
||||
# EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with
|
||||
# additional libraries. It is formatted as a colon-delimited list of
|
||||
# class directories and/or jar files. For example, to enable the
|
||||
# JMX-to-web bridge install libmx4j-java and uncomment the following.
|
||||
#EXTRA_CLASSPATH="/usr/share/java/mx4j-tools.jar"
|
Loading…
Reference in New Issue