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

Merge branch 'role_update' into 'master'

Role update

See merge request !4
parents 3a41e39f 3197e26d
No related branches found
No related tags found
1 merge request!4Role update
Pipeline #11072 passed
...@@ -5,6 +5,8 @@ Ansible playbook to configure servers on the GPN: ...@@ -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 - 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). 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. 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! ...@@ -15,8 +17,8 @@ WARNING! Be sure to run this playbook on the proper inventory!
Requirements Requirements
------------ ------------
- ansible >= 2.4 - ansible >= 2.7
- molecule >= 2.6 - molecule >= 2.19
License 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): ...@@ -18,3 +18,14 @@ def test_route_interfaces(host):
def test_route_exist(host): def test_route_exist(host):
cmd = host.run("/usr/sbin/ip route list") cmd = host.run("/usr/sbin/ip route list")
assert "172.30.0.0" in cmd.stdout 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 @@ ...@@ -4,3 +4,5 @@
roles: roles:
- role: ics-ans-role-samba-interfaces - role: ics-ans-role-samba-interfaces
- role: ics-ans-role-lab-route - role: ics-ans-role-lab-route
- role: ics-ans-role-localusers
- role: ics-ans-role-sudoers
...@@ -3,3 +3,7 @@ ...@@ -3,3 +3,7 @@
version: v0.1.0 version: v0.1.0
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-lab-route.git - src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-lab-route.git
version: v0.1.3 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