How to get ansible-pull with chroot connection to work?

129 views
Skip to first unread message

b...@tanners.org

unread,
Feb 2, 2022, 1:37:41 PM2/2/22
to Ansible Project
Try to get ansible-pull -c chroot to work and I keep getting warnings and the playbooks are not run.

# ansible-pull -vv -c chroot --accept-host-key -U git@xxx:ansible-roles/chroot-bootstrap.git
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'

Current playbook is called local.yml 

# cat local.yml
---
- hosts: all
  connection: chroot
  become: true

  tasks:
    <snip>

I've tried the several hosts:

- hosts: localhost
- hosts: chroots with chroots file containing

# cat chroots
[chroots]
  /mnt

Nothing works.

NOT using ansible-pull works like this

ansible-playbook -c chroot -i "/mnt," local.yml
ansible-playbook -c chroot -i chroots local.yml (with the above chroots host inv file)

Any help to get ansible-pull working?

Thanks.
Reply all
Reply to author
Forward
0 new messages