Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
awx
/
unnactivate-ssh-root
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
15dea747
authored
2025-07-16 16:58:28 -0400
by
awx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update main.yaml
1 parent
c3464eb1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
main.yaml
main.yaml
View file @
15dea74
---
-
name
:
Desactivar acceso SSH como root
-
name
:
Obtener información del sistema operativo
hosts
:
all
become
:
yes
tasks
:
-
name
:
Asegurar que 'PermitRootLogin no' esté en sshd_config
lineinfile
:
path
:
/etc/ssh/sshd_config
regexp
:
'
^#?PermitRootLogin\s+.*'
line
:
'
PermitRootLogin
no'
state
:
present
backrefs
:
yes
gather_facts
:
yes
become
:
no
-
name
:
Asegurar que 'UsePAM yes' esté en sshd_config
lineinfile
:
path
:
/etc/ssh/sshd_config
regexp
:
'
^#?UsePAM\s+.*'
line
:
'
UsePAM
yes'
state
:
present
backrefs
:
yes
-
name
:
Reiniciar el servicio sshd
service
:
name
:
sshd
state
:
restarted
\ No newline at end of file
tasks
:
-
name
:
Mostrar versión del sistema operativo
debug
:
msg
:
"
El
host
{{
inventory_hostname
}}
tiene
el
sistema
{{
ansible_distribution
}}
{{
ansible_distribution_version
}}
({{
ansible_distribution_release
}})"
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment