lxd_container changed on each playbook run

7 views
Skip to first unread message

Jonathan Rosser

unread,
Aug 23, 2016, 10:49:16 AM8/23/16
to Ansible Project
I create containers using the lxd_containers module. The "apply_container_configs" action is run each time the playbook runs so the task is "changed" on every playbook run.

Here is the verbose output http://pastebin.com/Yp5uJ7xQ

Ubuntu 16.04
ansible --version
ansible 2.2.0

---
container_list:
  - name: foobar
    hwaddr: "00:16:3e:1c:94:38"
    profile: "single-interface"
    alias: "local-ubuntu-16.04"

---
# create all of the containers on the container hosts
- name: create container
  lxd_container:
    architecture: x86_64
    ephemeral: false
    name: "{{ item.name }}"
    state: started
    source:
      type: image
      alias: "{{ item.alias }}"
    config: {"volatile.eth0.hwaddr": "{{ item.hwaddr }}"}
    profiles: [ "{{ item.profile }}" ]
  with_items: "{{ container_list }}"
Reply all
Reply to author
Forward
0 new messages