-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: featured
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,7 @@ | |||
--- | |||
- name: Start my service |
There was a problem hiding this comment.
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 }}" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 }}" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Please review kibana role