# Triggering playbook within rc.local

**URL:** <https://forum.ansible.com/t/triggering-playbook-within-rc-local/21851>\
**Category:** Ansible Project\
**Created:** [June 24, 2016, 2:39am UTC](https://forum.ansible.com/t/triggering-playbook-within-rc-local/21851 "2016-06-24T02:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xiaohui\_Liu](https://avatars.discourse-cdn.com/v4/letter/x/dec6dc/32.png) [@Xiaohui\_Liu](https://forum.ansible.com/u/Xiaohui_Liu)\
**Post date:** [June 24, 2016, 2:39am UTC](https://forum.ansible.com/t/triggering-playbook-within-rc-local/21851/1 "2016-06-24T02:39:06Z")

</div>

I met a problem using ansible-playbook today.

I prepared a playbook, and tried to trigger the playbook inside rc.local. The idea is that the machine will be bootstrapped automatically on boot.

But rc.local does not output anything. While, iuf run ‘sudo /etc/rc.local’, the playbook is played correctly.

Has anyone tried to run ansible-playbook in rc.local? Is there any special configuration I should apply?

Regards  
Xiaohui
