Skip to content

Commit

Permalink
Merge pull request #318 from freyes/model-defaults
Browse files Browse the repository at this point in the history
Pass --file when running juju model-defaults
  • Loading branch information
wolsen authored Feb 13, 2024
2 parents 6a124b5 + 202a3ad commit 584e9e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion roles/juju-setup/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
- systemctl daemon-reload
- systemctl restart systemd-resolved
EOF
/snap/bin/juju model-default /home/ubuntu/cloudinit-userdata.yaml
# juju>=3.0 expects the `--file` flag to pass default values in a file.
if dpkg --compare-versions $(juju --version | cut -d- -f1) ge 3.0.0; then
/snap/bin/juju model-defaults --file /home/ubuntu/cloudinit-userdata.yaml
else
/snap/bin/juju model-defaults /home/ubuntu/cloudinit-userdata.yaml
fi
args:
executable: /bin/bash

0 comments on commit 584e9e6

Please sign in to comment.