Skip to content
Snippets Groups Projects
Commit c4f7f803 authored by Benguria Elguezabal, Gorka's avatar Benguria Elguezabal, Gorka
Browse files

new structure based on submodules

parent 5145fe9d
Branches
No related tags found
No related merge requests found
Showing
with 10 additions and 123 deletions
[submodule "security_monitoring"]
path = security_monitoring
url = ../../agents/sma-playbook.git
[submodule "performance_monitoring"]
path = performance_monitoring
url = ../../agents/pma-playbook.git
--- ---
iac: iac:
- terraform - terraform
- piacere_monitoring_requirements - performance_monitoring
- piacere_monitoring - security_monitoring
- nginx - nginx
... ...
\ No newline at end of file
Subproject commit 76fb3507d97846509eafa3a3bcdbdf0d787dec41
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
[defaults]
host_key_checking = False
deprecation_warnings=False ; to remove the python version depretation warning
display_skipped_hosts = no
\ No newline at end of file
---
input:
- instance_ip_vm1
- instance_server_private_key_user1
- DEPLOYMENT_ID
output: []
engine: ansible
...
[servers_for_piacere_monitoring]
{{ instance_ip_vm1 }}
[servers_for_piacere_monitoring:vars]
ansible_connection=ssh
ansible_user=ubuntu
ansible_ssh_private_key_file=ssh_key
- hosts: all
pre_tasks:
- name: Check parameters
fail:
msg: 'variable {{item}} empty'
when: item | length == 0
with_items:
- "{{ pma_deployment_id }}"
- "{{ pma_influxdb_bucket }}"
- "{{ pma_influxdb_token }}"
- "{{ pma_influxdb_org }}"
- "{{ pma_influxdb_addr }}"
- name: Print parameters
debug:
msg:
- "pma_deployment_id: {{ pma_deployment_id }}"
- "pma_influxdb_bucket: {{ pma_influxdb_bucket }}"
- "pma_influxdb_token: {{ pma_influxdb_token }}"
- "pma_influxdb_org: {{ pma_influxdb_org }}"
- "pma_influxdb_addr: {{ pma_influxdb_addr | length }}"
- name: Ensure gnupg package
package:
name: gnupg
state: present
become: true
vars_files:
- vars/main.yaml
roles:
- dj-wasabi.telegraf
- hosts: localhost
tasks:
- name: print disclamer
debug:
msg: this can also be done with "ansible-galaxy install -r requirements"
- name: install telegraf from galaxy
community.general.ansible_galaxy_install:
type: role
requirements_file: ansible_requirements.yml
{{ instance_server_private_key_user1 }}
pma_deployment_id: "{{ lookup('env', 'DEPLOYMENT_ID' ) }}"
pma_influxdb_bucket: "{{ lookup('env', 'INFLUXDB_BUCKET' ) }}"
pma_influxdb_token: "{{ lookup('env', 'INFLUXDB_TOKEN' ) }}"
pma_influxdb_org: "{{ lookup('env', 'INFLUXDB_ORG' ) }}"
pma_influxdb_addr: "{{ lookup('env', 'INFLUXDB_ADDR' ) }}"
telegraf_agent_package_state: latest
telegraf_agent_output:
- type: influxdb_v2
config:
- urls = ["{{ pma_influxdb_addr }}"]
- token = "{{ pma_influxdb_token }}"
- organization = "{{ pma_influxdb_org }}"
- bucket = "{{ pma_influxdb_bucket }}"
- insecure_skip_verify = true
telegraf_global_tags:
- tag_name: deployment_id
tag_value: "{{ pma_deployment_id }}"
telegraf_plugins_default:
- plugin: cpu
- plugin: mem
- plugin: processes
- plugin: disk
- plugin: net
\ No newline at end of file
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
[defaults]
host_key_checking = False
deprecation_warnings=False ; to remove the python version depretation warning
display_skipped_hosts = no
\ No newline at end of file
roles:
# - name: dj-wasabi.telegraf
# version: 0.13.2
# source: https://galaxy.ansible.com
- name: dj-wasabi.telegraf
src: https://github.com/dj-wasabi/ansible-telegraf.git
scm: git
version: 0.13.2
---
input: []
output: []
engine: ansible
...
localhost ansible_connection=local
\ No newline at end of file
- name: "Intalling requirements"
hosts: localhost
connection: local
tasks:
- name: print disclamer
debug:
msg: this can also be done with "ansible-galaxy install -r requirements"
- name: install telegraf from galaxy
community.general.ansible_galaxy_install:
type: role
requirements_file: ansible_requirements.yml
Subproject commit b7b77584b5b22de27d6b5c59a71f67c7023f5099
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment