Skip to content
Snippets Groups Projects
Commit fbd3499c authored by debora.benedetto@hpe.com's avatar debora.benedetto@hpe.com
Browse files

removed tpl file in monitoring file generation

parent 9f6415bd
Branches
No related tags found
No related merge requests found
Showing
with 23 additions and 45 deletions
......@@ -12,7 +12,7 @@
</machineDefinition>
</nodes>
<networks name="net1" protocol="tcp/ip" addressRange="16.0.0.0/24" connectedIfaces="//@infrastructure/@nodes.0/@machineDefinition/@ifaces.0"/>
<credentials xsi:type="infra:KeyPair" name="ssh_key" user="user1"/>
<credentials xsi:type="infra:KeyPair" name="user1" user="user1"/>
<groups xsi:type="infra:SecurityGroup" name="sg" groupedNodes="//@infrastructure/@nodes.0/@machineDefinition" ifaces="//@infrastructure/@nodes.0/@machineDefinition/@ifaces.0">
<rules name="icmp" protocol="icmp" fromPort="-1" toPort="-1">
<cidr>0.0.0.0/0</cidr>
......@@ -32,7 +32,7 @@
<providers name="openstack">
<vms name="concrete_vm" maps="//@infrastructure/@nodes.0/@machineDefinition">
<annotations xsi:type="commons:SProperty" key="vm_name" value="nginx-host"/>
<annotations xsi:type="commons:SProperty" key="vm_flavor" value="ubuntu"/>
<annotations xsi:type="commons:SProperty" key="vm_flavor" value="small"/>
</vms>
<networks name="concrete_net" maps="//@infrastructure/@networks.0">
<annotations xsi:type="commons:SProperty" key="name" value="ostack2"/>
......
......@@ -50,7 +50,7 @@
],
"credentials": [
{
"infra_element_name": "ssh_key",
"infra_element_name": "user1",
"user": "user1"
}
],
......@@ -71,7 +71,7 @@
"provider": "openstack",
"vms": [
{
"credentials": "ssh_key",
"credentials": "user1",
"group": "sg",
"i1": {
"associated": "sg",
......@@ -82,7 +82,7 @@
"infra_element_name": "vm1",
"name": "concrete_vm",
"os": "Ubuntu-Focal-20.04-Daily-2022-04-19",
"vm_flavor": "ubuntu",
"vm_flavor": "small",
"vm_name": "nginx-host"
}
]
......@@ -94,7 +94,7 @@
"piacere_monitoring": {
"name": "piacere_monitoring",
"node": {
"credentials": "ssh_key",
"credentials": "user1",
"group": "sg",
"i1": {
"associated": "sg",
......@@ -105,7 +105,7 @@
"infra_element_name": "vm1",
"name": "concrete_vm",
"os": "Ubuntu-Focal-20.04-Daily-2022-04-19",
"vm_flavor": "ubuntu",
"vm_flavor": "small",
"vm_name": "nginx-host"
}
}
......@@ -118,7 +118,7 @@
"nginx": {
"name": "nginx",
"node": {
"credentials": "ssh_key",
"credentials": "user1",
"group": "sg",
"i1": {
"associated": "sg",
......@@ -129,7 +129,7 @@
"infra_element_name": "vm1",
"name": "concrete_vm",
"os": "Ubuntu-Focal-20.04-Daily-2022-04-19",
"vm_flavor": "ubuntu",
"vm_flavor": "small",
"vm_name": "nginx-host"
},
"source_code": "/usr/share/nginx/html/index.html"
......
......@@ -2,7 +2,7 @@
---
input:
- instance_ip_vm1
- instance_server_private_key_ssh_key
- instance_server_private_key_user1
output: []
engine: ansible
...
{{ instance_server_private_key_ssh_key }}
{{ instance_server_private_key_user1 }}
......@@ -2,7 +2,7 @@
---
input:
- instance_ip_vm1
- instance_server_private_key_ssh_key
- instance_server_private_key_user1
output: []
engine: ansible
...
{{ instance_server_private_key_ssh_key }}
{{ instance_server_private_key_user1 }}
......@@ -9,8 +9,8 @@ input:
- OS_PROJECT_NAME
output:
- instance_server_public_key_ssh_key
- instance_server_private_key_ssh_key
- instance_server_public_key_user1
- instance_server_private_key_user1
- instance_ip_vm1
...
......@@ -25,8 +25,8 @@ data "openstack_networking_network_v2" "external" {
resource "openstack_compute_instance_v2" "vm1" {
name = "nginx-host"
image_name = "Ubuntu-Focal-20.04-Daily-2022-04-19"
flavor_name = "ubuntu"
key_pair = openstack_compute_keypair_v2.ssh_key.name
flavor_name = "small"
key_pair = openstack_compute_keypair_v2.user1.name
network {
port = openstack_networking_port_v2.net1.id
}
......@@ -141,7 +141,7 @@ resource "openstack_compute_secgroup_v2" "ssh" {
# Create ssh keys
resource "openstack_compute_keypair_v2" "ssh_key" {
resource "openstack_compute_keypair_v2" "user1" {
name = "user1"
# public_key = "user1"
}
......
output "instance_server_public_key_ssh_key" {
value = openstack_compute_keypair_v2.ssh_key.public_key
output "instance_server_public_key_user1" {
value = openstack_compute_keypair_v2.user1.public_key
}
output "instance_server_private_key_ssh_key" {
value = openstack_compute_keypair_v2.ssh_key.private_key
output "instance_server_private_key_user1" {
value = openstack_compute_keypair_v2.user1.private_key
}
output "instance_ip_vm1" {
......
......@@ -42,7 +42,7 @@ nginx = templates/ansible/ubuntu/nginx.tpl
mysql = templates/ansible/ubuntu/mysql.tpl
wordpress = templates/ansible/ubuntu/wordpress.tpl
postgres = templates/ansible/ubuntu/postgres.tpl
piacere_monitoring = templates/ansible/ubuntu/monitoring/main.tpl
piacere_monitoring = templates/ansible/ubuntu/piacere_main.tpl
[ansible.centos]
mysql = templates/ansible/centos/mysql.tpl
......
---
- 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
- hosts: all
pre_tasks:
- name: Ensure gnupg package
package:
name: gnupg
state: present
become: true
vars_files:
- vars/main.yaml
roles:
- dj-wasabi.telegraf
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment