Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-self-service
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
its-servicedesk
linux-self-service
Commits
d7bc117e
Commit
d7bc117e
authored
6 months ago
by
James McKenzie
Browse files
Options
Downloads
Patches
Plain Diff
Address ansible-lint errors
parent
9e8bdab0
No related branches found
No related tags found
1 merge request
!5
Fix ansible playbooks
Pipeline
#553164
passed with stage
in 14 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
playbooks/eduroam.yaml
+12
-14
12 additions, 14 deletions
playbooks/eduroam.yaml
playbooks/network_reset.yaml
+3
-5
3 additions, 5 deletions
playbooks/network_reset.yaml
tasks/require_sudo.yaml
+4
-4
4 additions, 4 deletions
tasks/require_sudo.yaml
with
20 additions
and
24 deletions
.gitlab-ci.yml
+
1
−
1
View file @
d7bc117e
...
...
@@ -5,4 +5,4 @@ ansible-lint: # Validate ansible configuration
stage
:
validate
image
:
registry.gitlab.com/pipeline-components/ansible-lint:latest
script
:
-
ansible-lint --show-relpath
\ No newline at end of file
-
ansible-lint --show-relpath
This diff is collapsed.
Click to expand it.
playbooks/eduroam.yaml
+
12
−
14
View file @
d7bc117e
...
...
@@ -10,22 +10,20 @@
msg
:
"
This
playbook
must
be
run
as
your
own
user
account."
when
:
ansible_user_id == "root"
-
name
:
Remove existing Eduroam Wi-Fi Network
ansible.builtin.
shell
:
ansible.builtin.
command
:
cmd
:
/usr/bin/nmcli connection delete eduroam
ignore_errors
:
true
-
name
:
Add Eduroam Wi-Fi Network
ansible.builtin.
shell
:
ansible.builtin.
command
:
cmd
:
>
/usr/bin/nmcli connection add con-name eduroam
type wifi
ssid eduroam
connection.permissions {{ ansible_user_id }}
connection.autoconnect-priority -10
wifi-sec.key-mgmt wpa-eap
802-1x.eap peap
802-1x.anonymous-identity "@ebi.ac.uk"
802-1x.identity "{{ ansible_user_id }}@ebi.ac.uk"
802-1x.phase2-auth mschapv2
/usr/bin/nmcli connection add con-name eduroam
type wifi
ssid eduroam
connection.permissions {{ ansible_user_id }}
connection.autoconnect-priority -10
wifi-sec.key-mgmt wpa-eap
802-1x.eap peap
802-1x.anonymous-identity "@ebi.ac.uk"
802-1x.identity "{{ ansible_user_id }}@ebi.ac.uk"
802-1x.phase2-auth mschapv2
802-1x.system-ca-certs true
\ No newline at end of file
This diff is collapsed.
Click to expand it.
playbooks/network_reset.yaml
+
3
−
5
View file @
d7bc117e
...
...
@@ -3,10 +3,8 @@
-
name
:
Reset Network Services
hosts
:
localhost
tasks
:
-
ansible.builtin.import_tasks
:
../tasks/require_sudo.yaml
# - name: Re-apply Netplan Configuration
# ansible.builtin.script:
# cmd: '/usr/sbin/netplan apply'
-
name
:
Import tasks
ansible.builtin.import_tasks
:
../tasks/require_sudo.yaml
-
name
:
Restart NetworkManager
ansible.builtin.service
:
name
:
NetworkManager
...
...
@@ -14,4 +12,4 @@
-
name
:
Restart DNS
ansible.builtin.service
:
name
:
systemd-resolved
state
:
restarted
\ No newline at end of file
state
:
restarted
This diff is collapsed.
Click to expand it.
tasks/require_sudo.yaml
+
4
−
4
View file @
d7bc117e
---
-
name
:
Privilege Escalation
ansible.builtin.fail
:
msg
:
"
This
playbook
must
be
run
with
elevated
permissions.
Please
re-run
with
sudo."
when
:
ansible_user_id != "root"
\ No newline at end of file
-
name
:
Privilege Escalation
ansible.builtin.fail
:
msg
:
"
This
playbook
must
be
run
with
elevated
permissions.
Please
re-run
with
sudo."
when
:
ansible_user_id != "root"
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment