saltstack-formulas / docker-formula

Install and set up Docker
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
136 stars 330 forks source link

[BUG] Issues with repo install.sls in v1.0.0 #258

Closed hkbakke closed 3 years ago

hkbakke commented 3 years ago

https://github.com/saltstack-formulas/docker-formula/blob/master/docker/software/package/repo/install.sls has a couple of issues:

  1. refresh is misspelled as 'refesh'
  2. Onlyif seems to not be used correctly. As I have understood it should either specify a command or a module, not be fed a dictionary raw from pillar. I get the following warning when executing with a custom repo:
[WARNING ] no `fun` argument in onlyif: OrderedDict([('comments', ['installed by salt']), ('enabled', 1), ('gpgcheck', 1), ('name', 'deb [arch=amd64] http://mirror.example.com/download.docker.com/linux/debian buster stable'), ('file', '/etc/apt/sources.list.d/docker.list'), ('key_url', 'http://mirror.example.com/keys/docker.gpg.key')])                                       

Pillar:

docker:
  pkg:
    docker:
      use_upstream: package
      repo:
        name: deb [arch=amd64] http://mirror.example.com/download.docker.com/linux/debian {{ grains['oscodename'] }} stable
        key_url: http://mirror.example.com/keys/docker.gpg.key