Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.6.8' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinb committed Apr 20, 2021
2 parents 66a4fa4 + 3fcd93d commit 6b97170
Show file tree
Hide file tree
Showing 21 changed files with 391 additions and 352 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.idea/
.python-version
*.pyc
*.rake_tasks~
*.swp
.cache/
.idea/
.python-version
Gemfile.lock
pytestdebug.log
79 changes: 32 additions & 47 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,62 @@
# Changelog

## 1.6.7
## 1.6.8

### Fix

* Ansible Galaxy still not acknowledging Fedora 33. Related to #106. [Ben Dalling]
* Document the deprecation of cassandra_path. [Ben Dalling]

* Correct path names when clearing data as part of a cluster rejoin. This partially resolves some of the issues raised in #116. [Ben Dalling]
* Bump minimum Ansible version to 2.10.9. [Ben Dalling]

* Clarify the effect of cassandra_join_cluster on cassandra_directories. [Ben Dalling]
* Resolve Ansible lint errors in metadata. [Ben Dalling]

* Flag cassandra_path as deprecated. [Ben Dalling]

## 1.6.6 (2021-02-10)

### Fix

* Add GPG key F1000962B7F6840C for Debian. [Ben Dalling]

* Ensure Python packages are cached in GitHub workflows. [Ben Dalling]

* Ensure role is published to Ansible Galaxy. [Ben Dalling]
* CASSANDRA-2356 and code refactor. [nkakouros]

### Other

* Revert metadata (Fedora-33). [Ben Dalling]
* Build(deps): bump urllib3 from 1.26.3 to 1.26.4. [dependabot[bot]]

* Build(deps): bump cryptography from 3.3.1 to 3.3.2. [dependabot[bot]]
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.3 to 1.26.4.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.3...1.26.4)

Bumps [cryptography](https://github.com/pyca/cryptography) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.3.1...3.3.2)
* Build(deps): bump pyyaml from 5.3.1 to 5.4. [dependabot[bot]]

Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4)

## 1.6.5 (2020-12-28)
* Build(deps): bump urllib3 from 1.26.2 to 1.26.3. [dependabot[bot]]

### New
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.2...1.26.3)

* Implement the gitchangelog Python package. [Ben Dalling]
* Build(deps): bump jinja2 from 2.11.2 to 2.11.3. [dependabot[bot]]

* Migrate latest checks from TravisCI to GitHub workflows. [Ben Dalling]
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

* Start migration from TravisCI to GitHub Workflow. [Ben Dalling]

## 1.6.7 (2021-02-13)

### Fix

* Reduce duplicated templates for Systemd. [Ben Dalling]
* Ansible Galaxy still not acknowledging Fedora 33. Related to #106. [Ben Dalling]

* Resolve issues with new testinfra version. [Ben Dalling]
* Correct path names when clearing data as part of a cluster rejoin. This partially resolves some of the issues raised in #116. [Ben Dalling]

* Ensure testing against latest Python packages. [Ben Dalling]
* Clarify the effect of cassandra_join_cluster on cassandra_directories. [Ben Dalling]


## 1.6.6
## 1.6.6 (2021-02-10)

### Fix

Expand Down Expand Up @@ -93,25 +97,6 @@
* Ensure testing against latest Python packages. [Ben Dalling]


## 1.6.5

### New

* Implement the gitchangelog Python package. [Ben Dalling]

* Migrate latest checks from TravisCI to GitHub workflows. [Ben Dalling]

* Start migration from TravisCI to GitHub Workflow. [Ben Dalling]

### Fix

* Reduce duplicated templates for Systemd. [Ben Dalling]

* Resolve issues with new testinfra version. [Ben Dalling]

* Ensure testing against latest Python packages. [Ben Dalling]


## [1.6.4](https://github.com/locp/ansible-role-cassandra/tree/1.6.4) (2020-10-30)

[Full Changelog](https://github.com/locp/ansible-role-cassandra/compare/1.6.3...1.6.4)
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ executes this module.
3.0.21, 3.11.7, 4.0. As we are running our tests against 3.11.6 at the
moment, this applies the fix to `/etc/init.d/cassandra` if set to True.

* `cassandra_2356_workaround`: (default: *False*)
[CASSANDRA-2356](https://issues.apache.org/jira/browse/CASSANDRA-2356)
affected deb packages for Cassandra versions pre-4.0.

* `cassandra_cms_heap_new_size_mb`:
A custom fact that returns a value (MB) that might be suitable to set the
HEAP_NEWSIZE when using the Concurrent Mark Sweep (CMS) Collector. See
Expand Down Expand Up @@ -112,6 +116,14 @@ executes this module.
`cassandra_cms_max_heapsize_mb`, `cassandra_max_heapsize_mb`,
`cassandra_cms_heap_new_size_mb` and `cassandra_heap_new_size_mb`.

* `cassandra_path`
This variable was introduced in version 1.4.0 but was
missed from being documented. As
[pointed out](https://github.com/locp/ansible-role-cassandra/issues/116) if the variable is defined when the
variable is set and the directory is deleted, it is not
recreated. The variable has now been deprecated in
favour of `cassandra_directories`.

* `cassandra_node_count`:
A read-only variable that attempts to contain the number of nodes in the
cluster. Will only be set if `cassandra_join_cluster` is set to `True`.
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# defaults file for cassandra
cassandra_15770_workaround: False
cassandra_2356_workaround: False
cassandra_configuration_templ: "cassandra.yaml.j2"
cassandra_configure_apache_repo: False
cassandra_install_packages: True
Expand Down
4 changes: 3 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ galaxy_info:

role_name: cassandra

namespace: locp

github_branch: main

license: GPLv3

min_ansible_version: 2.9.2
min_ansible_version: 2.10.0

galaxy_tags:
- apache
Expand Down
8 changes: 4 additions & 4 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ RUN yum install -y dnf \
RUN apt-get clean
RUN apt-get update
RUN apt-get update --fix-missing
RUN apt-get install -y --fix-missing apt-transport-https apt-utils python-apt sudo bash ca-certificates lsb-release procps \
|| apt-get install -y --fix-missing apt-transport-https apt-utils python-apt sudo bash ca-certificates lsb-release procps
RUN apt-get install -y --fix-missing apt-transport-https apt-utils python-apt python3-apt sudo bash ca-certificates lsb-release procps \
|| apt-get install -y --fix-missing apt-transport-https apt-utils python-apt python3-apt sudo bash ca-certificates lsb-release procps
RUN apt-get clean
{% elif item.image == 'debian:10' %}
#
Expand All @@ -47,8 +47,8 @@ RUN apt-get clean
RUN apt-get clean
RUN apt-get update
RUN apt-get update --fix-missing
RUN apt-get install -y --fix-missing apt-transport-https apt-utils python-apt sudo bash ca-certificates lsb-release procps \
|| apt-get install -y --fix-missing apt-transport-https apt-utils python-apt sudo bash ca-certificates lsb-release procps
RUN apt-get install -y --fix-missing apt-transport-https apt-utils python-apt python3-apt sudo bash ca-certificates lsb-release procps \
|| apt-get install -y --fix-missing apt-transport-https apt-utils python-apt python3-apt sudo bash ca-certificates lsb-release procps
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
RUN echo 'deb http://repos.azulsystems.com/debian stable main' > /etc/apt/sources.list.d/zulu.list
RUN apt-get clean \
Expand Down
26 changes: 18 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
ansible==2.9.2
ansible-lint==4.3.7
ansible==2.10.0
ansible-lint==5.0.3
arrow==0.17.0
attrs==20.3.0
bcrypt==3.2.0
binaryornot==0.4.4
bracex==2.1.1
Cerberus==1.3.2
certifi==2020.12.5
cffi==1.14.4
Expand All @@ -16,12 +17,13 @@ commonmark==0.9.1
cookiecutter==1.7.2
cryptography==3.3.2
docker==4.4.0
enrich==1.2.3
enrich==1.2.6
flake8==3.8.4
gitchangelog==3.0.4
idna==2.10
importlib-metadata==2.0.0
iniconfig==1.1.1
Jinja2==2.11.2
Jinja2==2.11.3
jinja2-time==0.2.0
MarkupSafe==1.1.1
mccabe==0.6.1
Expand All @@ -31,31 +33,39 @@ packaging==20.8
parameterized==0.7.4
paramiko==2.7.2
pathspec==0.8.1
pexpect==4.8.0
pluggy==0.13.1
poyo==0.5.0
ptyprocess==0.6.0
py==1.10.0
pycodestyle==2.6.0
pycparser==2.20
pyflakes==2.2.0
Pygments==2.7.3
Pygments==2.7.4
PyNaCl==1.4.0
pyparsing==2.4.7
pystache==0.5.4
pytest==6.2.1
pytest-testinfra==6.1.0
python-dateutil==2.8.1
python-slugify==4.0.1
PyYAML==5.3.1
PyYAML==5.4
requests==2.25.0
rich==9.4.0
rich==9.13.0
ruamel.yaml==0.16.12
ruamel.yaml.clib==0.2.2
sh==1.13.1
shellingham==1.3.2
six==1.15.0
subprocess-tee==0.1.6
tabulate==0.8.7
testinfra==5.3.1
text-unidecode==1.3
toml==0.10.2
tree-format==0.1.2
typing-extensions==3.7.4.3
urllib3==1.26.2
urllib3==1.26.4
wcmatch==8.1.2
websocket-client==0.57.0
yamllint==1.25.0
zipp==3.3.1
39 changes: 0 additions & 39 deletions tasks/apache_repo.yml

This file was deleted.

23 changes: 23 additions & 0 deletions tasks/assertions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---

- name: Check OS is supported
assert:
that:
- ansible_os_family | default('') is in ['Debian', "RedHat"]
fail_msg: "unsupported OS ({{ ansible_os_family | d(None) }}) or facts not gathered"

- name: Check use of deprecated variables
debug:
msg: "{{ variable.name }} is deprecated; use {{ variable.replacement }} instead"
when: lookup('vars', variable.name, default='') | length
loop: "{{ deprecated_variables }}"
loop_control:
loop_var: variable
vars:
deprecated_variables:
- name: cassandra_dc
replacement: cassandra_regex_replacements
- name: cassandra_path
replacement: cassandra_directories
- name: cassandra_rack
replacement: cassandra_regex_replacements
60 changes: 60 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---

- name: Create Custom Directory
file:
group: "{{ directory.0.spec.group | default('cassandra') }}"
mode: "{{ directory.0.spec.mode | default(0700) }}"
owner: "{{ directory.0.spec.owner | default('cassandra') }}"
path: "{{ directory.1 }}"
state: directory
loop: "{{ cassandra_directories
| dict2items(key_name='set', value_name='spec')
| subelements('spec.paths') }}"
loop_control:
loop_var: directory
when:
- not ansible_check_mode
- cassandra_directories is defined

- name: Apply Cassandra Configuration
template:
src: "{{ cassandra_configuration_templ }}"
dest: "{{ cassandra_configuration_file }}"
owner: root
group: root
mode: 0o644
notify:
- cassandra_restart_service

- name: Apply Regular Expression Updates to the Configuration
lineinfile:
line: "{{ item.line }}"
path: "{{ cassandra_configuration_directory }}/{{ item.path }}"
regexp: "{{ item.regexp }}"
loop: "{{ cassandra_regex_replacements }}"
when:
- not ansible_check_mode
notify:
- cassandra_restart_service

- name: Set the DC for Cassandra
lineinfile:
dest: "{{ cassandra_configuration_file | dirname }}/cassandra-rackdc.properties"
regexp: '^dc='
line: "dc={{ cassandra_dc }}"
when:
- cassandra_dc is defined
- not ansible_check_mode
notify:
- cassandra_restart_service

- name: Set the Rack for Cassandra
lineinfile:
dest: "{{ cassandra_configuration_file | dirname }}/cassandra-rackdc.properties"
regexp: '^rack='
line: "rack={{ cassandra_rack }}"
when:
- cassandra_rack is defined
- not ansible_check_mode
notify:
- cassandra_restart_service
Loading

0 comments on commit 6b97170

Please sign in to comment.