summaryrefslogtreecommitdiffstats
path: root/ansible/roles/gsm-tester/tasks/main.yml
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-02-11 16:05:29 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-02-11 19:12:46 +0100
commit9562073194fdc838825b5d960fb1ba256ec4c493 (patch)
treeb0135670f953199100223c8ced685483cc82bc9d /ansible/roles/gsm-tester/tasks/main.yml
parenta264f9fcddeff25626cf6ef5b59317751ae5f763 (diff)
gsm-tester: Install helper scripts and sudoers.d files from git repo
Let's avoid duplicating and having to add manually the files here every time a new helper is required by osmo-gsm-tester. Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09
Diffstat (limited to 'ansible/roles/gsm-tester/tasks/main.yml')
-rw-r--r--ansible/roles/gsm-tester/tasks/main.yml74
1 files changed, 25 insertions, 49 deletions
diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml
index 0a5a838..309c187 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -262,57 +262,33 @@
content: "@osmo-gsm-tester - rtprio 99"
dest: /etc/security/limits.d/osmo-gsm-tester_rtprio.conf
-- name: create a wrapper script to add CAP_NET_RAW
- copy:
- src: osmo-gsm-tester_setcap_net_raw.sh
- dest: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh
- mode: 0755
-
-- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_raw.sh
- copy:
- content: |
- %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh
- dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw
- mode: 0440
-
-- name: create a wrapper script to add CAP_NET_ADMIN
- copy:
- src: osmo-gsm-tester_setcap_net_admin.sh
- dest: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh
- mode: 0755
-
-- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_admin.sh
- copy:
- content: |
- %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh
- dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_admin
- mode: 0440
-
-- name: create a wrapper script to run processes on modem netns
- copy:
- src: osmo-gsm-tester_netns_exec.sh
- dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh
- mode: 0755
-
-- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh
- copy:
- content: |
- %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_exec.sh
- dest: /etc/sudoers.d/osmo-gsm-tester_netns_exec
- mode: 0440
+- name: setup osmo-gsm-tester repository
+ git:
+ repo: 'git://git.osmocom.org/osmo-gsm-tester'
+ dest: /root/osmo-gsm-tester
+ version: master
+ clone: yes
+ update: no
+ tags:
+ - osmo-gsm-tester
-- name: create a wrapper script to move modem net iface into its own netns
- copy:
- src: osmo-gsm-tester_netns_setup.sh
- dest: /usr/local/bin/osmo-gsm-tester_netns_setup.sh
- mode: 0755
+- name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH)
+ shell: |
+ mkdir -p /usr/local/bin/ && \
+ cp utils/bin/*.sh /usr/local/bin/
+ args:
+ chdir: /root/osmo-gsm-tester
+ tags:
+ - osmo-gsm-tester
-- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_setup.sh
- copy:
- content: |
- %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_setup.sh
- dest: /etc/sudoers.d/osmo-gsm-tester_netns_setup
- mode: 0440
+- name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH)
+ shell: |
+ mkdir -p /etc/sudoers.d/ && \
+ cp utils/sudoers.d/* /etc/sudoers.d/
+ args:
+ chdir: /root/osmo-gsm-tester
+ tags:
+ - osmo-gsm-tester
- name: logrotate limit filesizes to 10M
copy: