mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-30 07:35:31 +02:00
* Apply ansible-lint improvements with light touch - Fix syntax errors in playbooks by properly structuring them - Fix YAML indentation in cloud-init base.yml - Update ansible-lint configuration to be stricter but reasonable - Add requirements.yml for Ansible collections - Skip role-name rule for now due to many cloud-* roles * Fix playbook syntax errors - proper task-only structure - Reverted playbook structure since these files are imported as tasks - Fixed indentation issues throughout cloud-pre.yml and cloud-post.yml - Aligned module parameters and when clauses properly - Removed FQCN for now to keep changes minimal * Fix final YAML indentation and formatting issues - Fixed cloud-post.yml indentation (8 spaces to 4) - Added newline at end of requirements.yml - All syntax checks now pass
30 lines
645 B
YAML
30 lines
645 B
YAML
# cloud-config
|
|
output: {all: '| tee -a /var/log/cloud-init-output.log'}
|
|
|
|
package_update: true
|
|
package_upgrade: true
|
|
|
|
packages:
|
|
- sudo
|
|
|
|
users:
|
|
- default
|
|
- name: algo
|
|
homedir: /home/algo
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
groups: adm,netdev
|
|
shell: /bin/bash
|
|
lock_passwd: true
|
|
ssh_authorized_keys:
|
|
- "{{ lookup('file', '{{ SSH_keys.public }}') }}"
|
|
|
|
write_files:
|
|
- path: /etc/ssh/sshd_config
|
|
content: |
|
|
{{ lookup('template', 'files/cloud-init/sshd_config') | indent(width=6) }}
|
|
|
|
runcmd:
|
|
- set -x
|
|
- ufw --force reset
|
|
- sudo apt-get remove -y --purge sshguard || true
|
|
- systemctl restart sshd.service
|