summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnicronNL <kim.sidney@gmail.com>2018-07-04 18:17:31 +0200
committerUnicronNL <kim.sidney@gmail.com>2018-07-04 18:17:31 +0200
commitda2d8340f754b433f92f5fe0efb3f23ccd4965f6 (patch)
tree2dcd7cb17424a709fb4dfa8a2bfbeaf7a1a0cc54
parent615dd2052ce194618cd6fbc0aabb3ad68687e7c3 (diff)
downloadvyos-salt-minion-da2d8340f754b433f92f5fe0efb3f23ccd4965f6.tar.gz
vyos-salt-minion-da2d8340f754b433f92f5fe0efb3f23ccd4965f6.zip
Add default minion user.
Set prio to 500
-rw-r--r--debian/vyos-salt-minion.postinst12
-rw-r--r--interface-definitions/salt-minion.xml1
-rwxr-xr-xsrc/conf_mode/salt-minion.py2
3 files changed, 14 insertions, 1 deletions
diff --git a/debian/vyos-salt-minion.postinst b/debian/vyos-salt-minion.postinst
index a427c3c..a1535eb 100644
--- a/debian/vyos-salt-minion.postinst
+++ b/debian/vyos-salt-minion.postinst
@@ -8,3 +8,15 @@ fi
if [ -x "/etc/init.d/salt-minion" ]; then
update-rc.d -f salt-minion remove >/dev/null
fi
+
+# Add minion user for salt-minion
+if ! grep -q '^minion' /etc/passwd; then
+ adduser --quiet --firstuid 100 --disabled-login --ingroup users --gecos "salt minion user" --shell /bin/vbash minion
+ adduser --quiet minion quaggavty
+ adduser --quiet minion vyattacfg
+ adduser --quiet minion sudo
+ adduser --quiet minion adm
+ adduser --quiet minion dip
+ adduser --quiet minion disk
+ adduser --quiet minion users
+fi
diff --git a/interface-definitions/salt-minion.xml b/interface-definitions/salt-minion.xml
index 3510590..f7acb2d 100644
--- a/interface-definitions/salt-minion.xml
+++ b/interface-definitions/salt-minion.xml
@@ -8,6 +8,7 @@
<node name="salt-minion" owner="${vyos_conf_scripts_dir}/salt-minion.py">
<properties>
<help>Salt Minion</help>
+ <priority>500</priority>
</properties>
<children>
<leafNode name="master">
diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py
index 621159b..2d855f0 100755
--- a/src/conf_mode/salt-minion.py
+++ b/src/conf_mode/salt-minion.py
@@ -62,7 +62,7 @@ mine_interval: 60
default_config_data = {
'master' : 'salt',
- 'user': 'vyos',
+ 'user': 'minion',
'salt_id': socket.gethostname()
}