Skip to content
Snippets Groups Projects
Commit 3197e26d authored by Te-Hung Tseng's avatar Te-Hung Tseng
Browse files

Role update

parent 3a41e39f
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ Ansible playbook to configure servers on the GPN:
- configure samba so that the interfaces created by docker are not broadcasted to AD and DNS
- Adds csi user to servers
This playbook should be applied on all nodes on the GPN (and only on the GPN).
As we use a static inventory for the GPN machines, this playbook uses the "all" group.
......@@ -15,8 +17,8 @@ WARNING! Be sure to run this playbook on the proper inventory!
Requirements
------------
- ansible >= 2.4
- molecule >= 2.6
- ansible >= 2.7
- molecule >= 2.19
License
-------
......
---
sudoers_user_list:
- name: csi #ansible user
nopasswd: true
localusers:
- name: csi
localusers_per_user_groups : true
......@@ -18,3 +18,14 @@ def test_route_interfaces(host):
def test_route_exist(host):
cmd = host.run("/usr/sbin/ip route list")
assert "172.30.0.0" in cmd.stdout
def test_sudoers_files(host):
with host.sudo():
assert host.file("/etc/sudoers.d/csi").content_string == "csi ALL=(ALL) NOPASSWD:ALL"
def test_sudo_with_csi(host):
with host.sudo("csi"):
cmd = host.run("sudo ls")
assert cmd.rc == 0
......@@ -4,3 +4,5 @@
roles:
- role: ics-ans-role-samba-interfaces
- role: ics-ans-role-lab-route
- role: ics-ans-role-localusers
- role: ics-ans-role-sudoers
......@@ -3,3 +3,7 @@
version: v0.1.0
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-lab-route.git
version: v0.1.3
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-localusers.git
version: v1.0.0
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-sudoers.git
version: v0.1.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment