Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunBoughey committed Aug 15, 2022
1 parent 1e69b88 commit 981c778
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,21 @@ Set these to use custom certificates that are not self signed. Ensure you set es
Example Playbook
----------------
Normal playbook
```yaml
---
- hosts: elastic
roles:
- pictowolf.elasticsearch
```
Upgrade playbook
```yaml
---
- hosts: elastic
serial: 1
roles:
- pictowolf.elasticsearch
```
9 changes: 3 additions & 6 deletions tasks/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,15 @@
- ""
creates: /etc/elasticsearch/certs/elastic-certs.p12
register: certificate_generated
when:
- inventory_hostname == groups['master'][0]
when: inventory_hostname == groups['master'][0]

- name: Change certificate permissions
ansible.builtin.file:
path: /etc/elasticsearch/certs/elastic-certs.p12
owner: root
group: "{{ es_group }}"
mode: '0666'
when:
- inventory_hostname == groups['master'][0]
when: inventory_hostname == groups['master'][0]

- name: Move certificate to Ansible server
ansible.builtin.fetch:
Expand All @@ -110,5 +108,4 @@
- inventory_hostname != groups['master'][0]
- groups['master'] | length > 1

when:
- es_generate_certs
when: es_generate_certs
1 change: 0 additions & 1 deletion tasks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
list: "elasticsearch-{{ es_major_version }}.{{ es_minor_version }}.x86_64"
register: installed_es_version


- name: Perform upgrade process
block:
- name: Disable shard allocation
Expand Down

0 comments on commit 981c778

Please sign in to comment.