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

fix(config): write config dictionary to daemon.json #282

Closed danny-smit closed 3 years ago

danny-smit commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No

Related issues and/or pull requests

Bug: Can't manage /etc/docker/daemon.json using pillar syntax in v1.0.0 (#257)

Describe the changes you're proposing

This change makes the pillar key daemon_config update the /etc/docker/daemon.json.

Pillar / config required to test the proposed changes

Fictive example configuration:

docker:
  pkg:
    docker:
      daemon_config:         
        debug: true                             
        tls: true                               
        tlscert: "/var/docker/server.pem"       
        tlskey: "/var/docker/serverkey.pem"     
        hosts:                                  
          - tcp://192.168.59.3:2376             

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

danny-smit commented 3 years ago

I just noticed that, according to the toplevel README, the config keys are meant to do the same as the environ keys?! That would imply that introducing daemon_config key would be better.

myii commented 3 years ago

Thanks for the PR, @danny-smit.

@noelmcloughlin @hatifnatt Would either of you mind reviewing this PR, since you've both been recently active here?

keslerm commented 3 years ago

Thanks @danny-smit this is a big one for us couldn't have had better timing

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 2.0.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: