image:
  distribution: slackware

source:
  downloader: slackware-http
  url: https://mirrors.slackware.com/slackware/

packages:
    manager: slackpkg
    sets:
        - packages:
            - sudo
          action: install

actions:
    - trigger: post-unpack
      action: |-
        #!/bin/bash
        touch /var/lib/slackpkg/current
      releases:
      - current

    - trigger: post-unpack
      action: |-
        #!/bin/bash
        update-ca-certificates -f
        slackpkg update gpg
      releases:
      - 15.0
      - current

files:
- name: hostname
  path: /etc/hostname
  generator: hostname

- name: hostname
  path: /etc/HOSTNAME
  generator: hostname

- name: hosts
  path: /etc/hosts
  generator: hosts

targets:
  lxc:
    create_message: |
      You just created a {{ image.description }} container.
    config:
    - type: all
      before: 5
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/slackware.common.conf

    - type: user
      before: 5
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/slackware.userns.conf

    - type: all
      after: 4
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/common.conf

    - type: user
      after: 4
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/userns.conf

    - type: all
      content: |-
        lxc.arch = {{ image.architecture_kernel }}

mappings:
  architecture_map: slackware
