- hosts: all- name: Add update to patch listcommand: xe patch-upload file-name=/root/PATCH/{{ update_filename }}register: uuid- name: Install update to all servers in the poolcommand: xe patch-pool-apply uuid={{ uuid.stdout }}But I get below output:root@LAB-1 plays]# ansible-playbook play2.yml --ask-passSSH password:ERROR: register is not a legal parameter in an Ansible Playbook
Thank you Serge van Ginderachter for replying :-)But is still get the error after adding tasksIs there a better way to do it ?[root@LAB-1 plays]# cat play2.yml----hosts: alltasks:
-name: Add update to patch listcommand: xe patch-upload file-name=/root/PATCH/{{ update_filename }}register: uuid-
name: Install update to server
command: xe patch-pool-apply uuid={{ uuid.stdout }}
[root@LAB-1 plays]# ansible-playbook play2.yml --ask-pass
SSH password:ERROR: register is not a legal parameter in an Ansible Playbook
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f3c0b064-831c-41d5-9cb8-8e366d0cd4c3%40googlegroups.com.
Thank you Serge van Ginderachter for replying :-)But is still get the error after adding tasksIs there a better way to do it ?
[root@LAB-1 plays]# cat play2.yml----hosts: alltasks:
-name: Add update to patch listcommand: xe patch-upload file-name=/root/PATCH/{{ update_filename }}register: uuid-
name: Install update to server
command: xe patch-pool-apply uuid={{ uuid.stdout }}
[root@LAB-1 plays]# ansible-playbook play2.yml --ask-pass
SSH password:ERROR: register is not a legal parameter in an Ansible Playbook