Ansible playbook that you can use to control ssh access to your linux servers. You can install or remove keys, tune sshd options and install additional software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
952 B

  1. # If you want to disable key just add key_state: "absent"
  2. # Example: stupid_manager: { keypath: "../keys/stupid_manager.pub", username: "ubuntu", key_state: "absent" }
  3. access_list:
  4. git: { keypath: "../keys/project-git.pub", username: "root" }
  5. dev1: { keypath: "../keys/developer1.pub", username: "developer" }
  6. dev2: { keypath: "../keys/developer2.pub", username: "developer" }
  7. # disable fired employer
  8. dev3: { keypath: "../keys/developer3.pub", username: "developer", key_state: "absent" }
  9. # remove user from OS, no managers on servers! fuck them all!
  10. dumb_manager: { keypath: "../keys/manager.pub", username: "manager", state: "absent" }
  11. # Set path to sshd config
  12. # Default: /etc/ssh/sshd_config
  13. sshd_config_path: "/var/local/etc/ssh/sshd_config"
  14. # Here you can change sshd parameters
  15. # change defaults here roles/ssh_config/defaults/main.yml
  16. sshd_options:
  17. # allow password auth instead of defaults
  18. PasswordAuthentication: "yes"