Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #1

Open
wants to merge 1 commit into
base: featured
Choose a base branch
from

Conversation

NaveenHaswani9961
Copy link
Collaborator

Please review kibana role

@@ -0,0 +1,7 @@
---
- name: Start my service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task name should be appropriate

service:
name: "{{ item }}"
state: started
loop: "{{ tool }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need of loop, user service name directly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add details related with role info

@@ -0,0 +1,6 @@
---
- name: jinja2 template configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming is according to task and should be like
Configure Kibana

update_cache: yes
when: ansible_os_family == 'Debian'

- name: dependencies are installing. (ubuntu)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Task naming should be proper
Install service dependecies

url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
state: present
validate_certs: yes
keyring: /usr/share/keyrings/elasticsearch-keyring.gpg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use variables


- name: adding repository (ubuntu)
apt_repository:
repo: 'deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use variables and should not stick with a specific version

- name: installing kibana (ubuntu)
apt:
update_cache: yes
name: "{{ tool }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use variable here as this role is related with kibana only

when: ansible_os_family == 'Debian'
notify: Start my service

- name: Adding GPG key (Red Hat)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split tasks into different file specific to host OS family

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If change required at one or two line then use lineinfile not template
Also no need of including complete default file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants