Browse Source

We are now creating the fastd user as specified in the Freifunk documentation

Till Klocke 9 years ago
parent
commit
31f477220e

+ 3 - 1
roles/fastd/defaults/main.yml

@@ -4,4 +4,6 @@ fastd_repo: http://git.universe-factory.net/fastd/
 fastd_repo_tag: v17
 fastd_install_dir: /opt/fastd
 fastd_build_dir: /usr/src/fastd-build
-fastd_install_from_source: false
+fastd_install_from_source: false
+fastd_user_name: fastd
+fastd_user_shell: /bin/false

+ 4 - 1
roles/fastd/tasks/debian.yml

@@ -25,4 +25,7 @@
 
 - name: Install fastd via Apt
   when: repo_universe_factory_available
-  apt: name=fastd state=latest
+  apt: name=fastd state=latest
+
+- name: Add fastd user
+  user: createhome=no system=yes shell={{fastd_user_shell}} name={{fastd_user_name}}

+ 5 - 0
test/integration/fastd/serverspec/test_spec.rb

@@ -14,4 +14,9 @@ end
 describe file('/etc/default/rng-tools') do
   it { should exist }
   its(:content) { should match /HRNGDEVICE=\/dev\/urandom/ }
+end
+
+describe user('fastd') do
+  it { should exist }
+  it { should have_login_shell '/bin/false' }
 end