Skip to content

Instantly share code, notes, and snippets.

@mattt416
Created May 6, 2015 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattt416/b29bffed2b13bc119407 to your computer and use it in GitHub Desktop.
Save mattt416/b29bffed2b13bc119407 to your computer and use it in GitHub Desktop.
---
- name: No idea
hosts: hosts
user: root
tasks:
- name: Get container names
command: lxc-ls
register: container_names
- name: stuff
debug: var=container_names
- name: Get container_info
lxc_container:
name: "{{ item }}"
register: config_container_info
with_items: container_names.stdout_lines
- name: Print container info
debug: var=config_container_info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment