Execution of Ansible playbook now reflecting any changes

0 votes

I have an Ansible playbook that to configure hostname on VyOS Server. I'm not getting an error and also I cant see an output if the playbook is getting executed successfully. 

Playbook:

--- 
 - hosts : server
   vars:
    inventory_hostname : vyos_host
   name : setting host name
      vyos_config
        lines
          - set system host-name {{ inventory_hostname }}
Jan 17 in Ansible by Moana
44 views

2 answers to this question.

0 votes

Hey @Moana, you playbook is missing the tasks session and even the identations aren't how they are suppossed to be. 

Write it something like this:

--- 
 - hosts : server
   vars:
     inventory_hostname : vyos_host
   tasks:
     - name : setting host name
       vyos_config:
         lines:
           - set system host-name {{ inventory_hostname }}
answered Jan 17 by Sameer
0 votes

Hey @Moana, you playbook is missing the tasks session and even the identations aren't how they are suppossed to be. 

Write it something like this:

--- 
 - hosts : server
   vars:
     inventory_hostname : vyos_host
   tasks:
     - name : setting host name
       vyos_config:
         lines:
           - set system host-name {{ inventory_hostname }}
answered Jan 17 by Sameer

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 views
0 votes
1 answer
0 votes
1 answer

Role of subelement module in an Ansible playbook

Hey @Rahul thanks for a better question ...READ MORE

answered Jan 16 in Ansible by Emily
118 views
0 votes
1 answer