Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion molecule/elasticsearch_upgrade_8to9/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
body_format: json
body:
test_field: "pre-upgrade-data"
timestamp: "{{ ansible_date_time.iso8601 }}"
timestamp: "{{ ansible_facts.date_time.iso8601 }}"
validate_certs: false
status_code: [200, 201]
register: index_result
Expand Down
2 changes: 1 addition & 1 deletion molecule/plugins/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- name: Debug
ansible.builtin.debug:
msg: "{{ test }}"
- name: Test required parameters (missing path)

Check warning on line 18 in molecule/plugins/converge.yml

View workflow job for this annotation

GitHub Actions / lint

args[module]

missing required arguments: path

Check warning on line 18 in molecule/plugins/converge.yml

View workflow job for this annotation

GitHub Actions / lint_full / lint

args[module]

missing required arguments: path
oddly.elasticstack.cert_info:
passphrase: PleaseChangeMe
failed_when: false
Expand All @@ -27,7 +27,7 @@
- name: Debug with to_datetime() - strip timezone for naive datetime arithmetic
ansible.builtin.debug:
msg: >-
"{{ ((test.not_valid_after | regex_replace('[+-]\d{2}:\d{2}$', '') | to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_date_time.date | to_datetime('%Y-%m-%d'))).days }}"
"{{ ((test.not_valid_after | regex_replace('[+-]\d{2}:\d{2}$', '') | to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_facts.date_time.date | to_datetime('%Y-%m-%d'))).days }}"
- name: Test wrong passphrase
oddly.elasticstack.cert_info:
path: files/es-ca/elastic-stack-ca.p12
Expand All @@ -37,6 +37,6 @@
oddly.elasticstack.cert_info:
path: files/es-ca/elastic-stack-ca.p12
failed_when: false
- name: Test no parameters

Check warning on line 40 in molecule/plugins/converge.yml

View workflow job for this annotation

GitHub Actions / lint

args[module]

missing required arguments: path

Check warning on line 40 in molecule/plugins/converge.yml

View workflow job for this annotation

GitHub Actions / lint_full / lint

args[module]

missing required arguments: path
oddly.elasticstack.cert_info:
failed_when: false
2 changes: 1 addition & 1 deletion roles/elasticstack/tasks/certs/cert_backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- name: "Create timestamped backup - {{ _backup_path }}"
ansible.builtin.copy:
src: "{{ _backup_path }}"
dest: "{{ _backup_path }}_{{ ansible_date_time.iso8601_micro }}"
dest: "{{ _backup_path }}_{{ ansible_facts.date_time.iso8601_micro }}"
mode: preserve
remote_src: "{{ _backup_target != 'localhost' }}"
when: elasticstack_backup_stat.stat.exists
Expand Down
2 changes: 1 addition & 1 deletion roles/elasticstack/tasks/certs/cert_check_expiry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
ansible.builtin.set_fact:
"{{ _cert_days_fact | default('elasticstack_cert_expiration_days') }}": >-
{{ (((elasticstack_cert_info.not_valid_after | regex_replace('[+-]\d{2}:\d{2}$', ''))
| to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_date_time.date
| to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_facts.date_time.date
| to_datetime('%Y-%m-%d'))).days }}

- name: "Set certificate expiry fact - {{ _cert_expiry_fact }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/elasticstack/tasks/certs/cert_expiry_warn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
ansible.builtin.set_fact:
_warn_days_remaining: >-
{{ ((((_warn_cert_result.not_valid_after | regex_replace('[+-]\d{2}:\d{2}$', ''))
| to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_date_time.date
| to_datetime('%Y-%m-%d %H:%M:%S')) - (ansible_facts.date_time.date
| to_datetime('%Y-%m-%d'))).days) }}
when: _warn_cert_result is succeeded

Expand Down
Loading