Configure a scanner user on all machines

This commit is contained in:
Salt 2021-12-30 10:04:18 -06:00
parent 1cff8a6aa8
commit 111f1cdef6
2 changed files with 17 additions and 0 deletions

16
playbooks/all_scanner.yml Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: all
tasks:
- name: assure scanner user
user: name=scanner password="!" state=present
tags: [ scanner, greenbone ]
- name: assure scanner user sudoers rule
lineinfile: path=/etc/sudoers line=
tags: [ scanner, greenbone ]
- name: assure scanner user authorized keys
authorized_key:
user: scanner
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCTtAXbh9IDD0dYIJhtWiOtmAYgH5ul5aMksb9RtdUa04DkZ2tcxIay9Wm/84yxultevvpOlFcKGNaBiLVHknkYO/eLS6W38xXy40DcIMRgzpWOu54hvL6jzzhbdupUkO+f6UGEE3j/uEnkoCKUbj0NMMDQgC/5t2N4lysuGeZMMOL85UdEmXdul4lQLlDywIo3P1cifxaRfnADgqQnt3zSlgIwKJi2Vjyh4A1Xox2wn8fQXs+MfuclVdWQlDkKFMuDdQdZnGUnqKjuEE1PZe/jDxTgjGBU3t3v8m2gRxZQyll6Ju6Z5oeBI6LN0P/Dt7XKyWmrWaub0pLDmklWqU0g+aUj5oiokvf/3A27EIoP5ifSK760B8DPZHLgM2OZhsUzUaYy36yFx3Le25iGlDWjIy9GZo1iZXp558I5VKLh4uUL4MjhvL5UpMLa4NL4VrHvrjzMbWquNvsMYVgk6Y07VaVcg43wTdcX6Jzxzd6IvGVBS1kXZC3kZeqU+zUYbQE="
tags: [ scanner, greenbone ]

View File

@ -3,6 +3,7 @@
---
# Preambulatory system configuration
- import_playbook: playbooks/all.yml
- import_playbook: playbooks/all_scanner.yml
# Platform configuration
- import_playbook: playbooks/platforms_ub2004.yml
- import_playbook: playbooks/platforms_proxmox-ve-7.yml