- name: Install packages tags: - lxc-host - lxc-host-packages - radvd become: yes apt: name: "{{ items }}" install_recommends: no vars: items: - lxc - python-lxc - radvd #- debug: # msg: "item={{ item }}, host={{ host }}, lan={{ lan }}" # tags: # - lxc-host # with_dict: "{{ lxc_host_containers }}" # vars: # i: "{{ item }}" # host: "{{ host_database[item.key] }}" # lan: "{{ host_database | json_query(item.key + '.interfaces | * | [?role==`lan`]') | first }}" - name: Configure radvd become: yes tags: - lxc-host - radvd vars: ipv6: "{{ host_database[ansible_hostname].interfaces[lxc_host__internal_if].ipv6 }}" notify: restart radvd copy: dest: /etc/radvd.conf content: | interface {{ lxc_host__br_if }} { AdvSendAdvert on; MinRtrAdvInterval 5; MaxRtrAdvInterval 10; MinDelayBetweenRAs 1; AdvDefaultPreference medium; AdvLinkMTU 1500; prefix {{ ipv6.address }}/{{ ipv6.netmask }} { AdvOnLink on; AdvAutonomous on; AdvValidLifetime 14400; AdvPreferredLifetime 3600; AdvRouterAddr on; }; }; - name: Configure host networking when: lxc_host__enable_network_cfg tags: - lxc-host - lxc-host-network include_tasks: networkd.yml - tags: lxc-host with_dict: "{{ lxc_host_containers }}" vars: i: "{{ item }}" host: "{{ host_database[item.key] }}" lan: "{{ host_database | json_query(item.key + '.interfaces | * | [?role==`lan`]') | first }}" include_tasks: per-host.yml this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff |