- I try to build a pipe-line to install my product.
- My product is installed in a lab with at least 8 machines (on-prem lab).
- I have several labs on-prem, several labs on cloud
- Each machine has a role, for example: a Center-DB machine, a Center-Queue machine or a Center-App machine, a Middle machine and a Client machine, etc... So, some labs are: 1 Center - 1 Middle - 1 Client. or 3 Centers (App, DB, Queue) - 2 Middles - 3 Clients
- Some of the machines has one service like DB, and some several like: DB, IIS, and message broker
- The lab is in a secured VLAN meaning that in order to run scripts from remote I need to connect to the machine with their IP and not with their FQDN and supply credentials.
- Credentials are the same for all machines.
- In addition, there is an option in the installation file to installed the product secured (with cert and port 443) or not secured.
- During installation process, I need to first copy to each machine it's specific installation files, then install them with specific arguments.
Except of list of host and IP addresses in inventories ansible yaml file, is it expectable to add variables or Keys such as:
- "credentials"
- "protocol",
- "files",
- "machine-type" etc...?
OR should they placed in a different file like roles (tasks). Please, help me to decide which information goes to where. My example yaml file is below:
---
cred:
user: a
pass: 1
center:
dbs:
- db:
fqdn: center-db.foo.com
cn: center-db
files:
- C:\folder\Server.msi
ip: 1.1.1.1
queues:
- queue:
fqdn: center-queue.foo.com
cn: center-queue
files:
- C:\folder\Server.msi
ip: 2.2.2.2
apps:
- app:
fqdn: center-app.foo.com
cn: center-app
files:
- C:\folder\Server.msi
- C:\folder\Center-Client.msi
- C:\folder\files
ip: 3.3.3.3
clients:
- client:
db:
cn: Client-DB
app:
fqdn: Client-APP.foo.com
cn: Client-APP
files:
- C:\folder\Server.msi
- C:\folder\Client-Client.msi
ip: 4.4.4.4