https://github.com/cdriehuys/ansible-role-lock-root
Ansible role to lock down root access.
https://github.com/cdriehuys/ansible-role-lock-root
ansible root security
Last synced: 3 months ago
JSON representation
Ansible role to lock down root access.
- Host: GitHub
- URL: https://github.com/cdriehuys/ansible-role-lock-root
- Owner: cdriehuys
- License: mit
- Created: 2017-03-20T20:26:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-14T03:57:32.000Z (about 8 years ago)
- Last Synced: 2025-01-07T07:44:22.493Z (5 months ago)
- Topics: ansible, root, security
- Language: Shell
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Role Name
=========Create a user for ansible, and lock down access to the root user.
Requirements
------------None.
Role Variables
--------------The following are the variables used by the role and their defaults.
```YAML
admin_user: ansible
admin_user_shell: /bin/bash
``````YAML
admin_user_public_keys:
- ~/.ssh/id_rsa.pub
```It is crucial that a valid SSH key be added for the user since that is the only way to login as the user.
Dependencies
------------None.
Example Playbook
----------------Running the role is fairly straightforward. The only issue is that if access to
the root user has already been disabled, the role might fail to connect if run
again.- hosts: all
remote_user: root
roles:
- { role: cdriehuys.lock-root, admin_user: ansible }License
-------MIT
Author Information
------------------Chathan Driehuys ([email protected])