Hi,
I have X amount of server inside a defined group (For example - web server)
I want to loop the server a define there hostname based on index+1
For example, if the group have 3 server , so server one should be
"web-server1" , second , "web-server-2" etc.
The below didnt do the trick - since it is looping the sequence for each
server
- hosts: web-server
remote_user: user
become: yes
tasks:
- name: Set a hostname
hostname:
name: web-server-{{ item }}
with_sequence: count=3
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4d7a9bb7-6403-4ac9-b77f-4212fafc5680n%40googlegroups.com.