Re: [ansible-project] Example for running a playbook using Python API

2017-04-25 Thread Dat Dao
Hi all, I have a Playbook which is used to push template configuration to the router, It work fine if I run command ansible-playbook playbook_name.yml But now I don't want call Playbook manually, I want to creat a file (such as pb.run) and then use it to call playbook. How I can do it? Please

Re: [ansible-project] Re: junos_template in Ansible 2.1

2017-03-13 Thread Dat Dao
017-03-13 8:47 GMT+07:00 Dat Dao : > Dear Peter, >Thanks for your response, but can you explain about the argument src in > the junos_template. > I don't know what do we fill after src's colon? the path or the file name? > In my ansible, I creat config.j2 at /etc/

Re: [ansible-project] Re: junos_template in Ansible 2.1

2017-03-12 Thread Dat Dao
the configure and commit statements > > On Sun, Mar 12, 2017 at 11:39 AM, Dat Dao wrote: > >> Hi IAN, >> I am a newbie in ansible sector, I wrote the playbook in which I used >> junos_template module, but when I run playbook, I got this error: >> he error

[ansible-project] Re: junos_template in Ansible 2.1

2017-03-12 Thread Dat Dao
Hi IAN, I am a newbie in ansible sector, I wrote the playbook in which I used junos_template module, but when I run playbook, I got this error: he error is "msg": "Unable to load config: ConfigLoadError(severity: error, bad_element: junos.set, message: error: unknown command)" which is odd s