Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
create liste from multi servers
5 views
Skip to first unread message
bigfootspi
unread,
Feb 21, 2022, 12:18:21 PM
2/21/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
hi ^^
I want to create an inventory of my park.
form this exemple, I'm getting the serveur name and linux's version
in my inventory, there is a group with my servers.
i want to execute this task and finaly, show one complet liste with all of my servers (in only one var)
have you an idea ?
- hosts: listeServers
gather_facts: no
vars:
bilan: ['inventry']
tasks:
- name: "Unix version"
shell: "echo Server : `uname -n` - `lsb_release -d -s`"
register: unix_version
- name: "add to bilan"
set_fact:
bilan: "{{ bilan + [ unix_version.stdout ] }}"
- debug: var=bilan
Reply all
Reply to author
Forward
0 new messages