#cloud-config

# run commands
# default: none
# runcmd contains a list of either lists or a string
# each item will be executed in order at rc.local like level with
# output to the console
# - if the item is a list, the items will be properly executed as if
#   passed to execve(3) (with the first arg as the command).
# - if the item is a string, it will be simply written to the file and
#   will be interpreted by 'sh'
#
# Note, that the list has to be proper yaml, so you have to escape
# any characters yaml would eat (':' can be problematic)
runcmd:
 - [ ls, -l, / ]

salt_minion:
  conf:
    master: {master_ip}
    id: {lxcname}
    acceptance_wait_time: 1
    recon_default: 100
    recon_max: 1000
    recon_randomize: False
    log_level: debug

# For some unknown reason, the minion sometimes does not start
# (and doesn't even leave a log file).  Force a start just in case
runcmd:
 - echo Sleeping for 5 seconds and attempting to start minion
 - sleep 5
 - /bin/systemctl start salt-minion.service
