From a4cf851b190eb27a9a3f4a766c68036b07e0f0d7 Mon Sep 17 00:00:00 2001 From: Debora Benedetto <debora.benedetto@hpe.com> Date: Fri, 20 May 2022 11:56:53 +0200 Subject: [PATCH] update output example files generated --- .../nginx_openstack/terraform/main.tf | 4 ---- .../ansible/config.yaml | 3 ++- .../ansible/nginx.play | 2 +- .../terraform/main.tf | 6 +---- .../ansible/playbooks/pma/vars/main.yaml | 23 +++++++++++++++++++ 5 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 templates/terraform/open_stack/agents_playbook/ansible/playbooks/pma/vars/main.yaml diff --git a/output_file_example/nginx_openstack/terraform/main.tf b/output_file_example/nginx_openstack/terraform/main.tf index 8d628ca..75b5e23 100644 --- a/output_file_example/nginx_openstack/terraform/main.tf +++ b/output_file_example/nginx_openstack/terraform/main.tf @@ -10,10 +10,6 @@ required_version = ">= 0.14.0" # Configure the OpenStack Provider provider "openstack" { - user_name = var.openstack_username - tenant_name = "admin" - password = var.openstack_password - auth_url = var.openstack_auth_url insecure = true } diff --git a/output_file_example/nginx_openstack_with_agents/ansible/config.yaml b/output_file_example/nginx_openstack_with_agents/ansible/config.yaml index f5b9945..31417c5 100644 --- a/output_file_example/nginx_openstack_with_agents/ansible/config.yaml +++ b/output_file_example/nginx_openstack_with_agents/ansible/config.yaml @@ -1,5 +1,6 @@ --- -input: [] +input: + - instance_server_public_key output: [] engine: ansible ... diff --git a/output_file_example/nginx_openstack_with_agents/ansible/nginx.play b/output_file_example/nginx_openstack_with_agents/ansible/nginx.play index c8790e1..758a689 100644 --- a/output_file_example/nginx_openstack_with_agents/ansible/nginx.play +++ b/output_file_example/nginx_openstack_with_agents/ansible/nginx.play @@ -3,7 +3,7 @@ gather_facts: no become: yes vars: - ansible_ssh_private_key_file: "/home/user1/.ssh/openstack.key" + ansible_ssh_private_key_file: "{{instance_server_public_key}}" ansible_ssh_user: "ubuntu" tasks: - name: Update repositories diff --git a/output_file_example/nginx_openstack_with_agents/terraform/main.tf b/output_file_example/nginx_openstack_with_agents/terraform/main.tf index ec92de4..31092e1 100644 --- a/output_file_example/nginx_openstack_with_agents/terraform/main.tf +++ b/output_file_example/nginx_openstack_with_agents/terraform/main.tf @@ -10,10 +10,6 @@ required_version = ">= 0.14.0" # Configure the OpenStack Provider provider "openstack" { - user_name = var.openstack_username - tenant_name = "admin" - password = var.openstack_password - auth_url = var.openstack_auth_url insecure = true } @@ -33,7 +29,7 @@ data "openstack_networking_secgroup_v2" "default" { # Create virtual machine resource "openstack_compute_instance_v2" "nginx" { name = "nginx-host" - image_name = "cirros" + image_name = "ubuntu-18.04" flavor_name = "m1.tiny" key_pair = openstack_compute_keypair_v2.user_key.name network { diff --git a/templates/terraform/open_stack/agents_playbook/ansible/playbooks/pma/vars/main.yaml b/templates/terraform/open_stack/agents_playbook/ansible/playbooks/pma/vars/main.yaml new file mode 100644 index 0000000..ada2316 --- /dev/null +++ b/templates/terraform/open_stack/agents_playbook/ansible/playbooks/pma/vars/main.yaml @@ -0,0 +1,23 @@ +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 + + -- GitLab