diff --git a/output_file_example/nginx_openstack/terraform/main.tf b/output_file_example/nginx_openstack/terraform/main.tf index 8d628caacc88ce0c721a3828a7dd9f994d6e4d53..75b5e2350079dfb376ad6d4bcb25e425ba03cd46 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 f5b9945aea768b2e8fa0d458646b3db9ed9d1ae5..31417c5bec8dc6e439af0aa05dddae529473a0ba 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 c8790e19071787ba9fef7d270947c8ec6f09048d..758a689e705a6af5823ea2c5cfb5f1f603f1b2a3 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 ec92de4ecbc60adbf6a8761077ccebb949ae3d62..31092e12e16a9e9cc3c056fef7e8f2db8b7b4f5a 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 0000000000000000000000000000000000000000..ada23165aebadbfe12bffb77368f0181fb4f1737 --- /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 + +