mirror of
https://github.com/Maks1mS/alt-linux-vagrant-boxes.git
synced 2025-01-11 19:21:04 +03:00
18 lines
582 B
YAML
18 lines
582 B
YAML
|
---
|
||
|
- name: Provision
|
||
|
hosts: default
|
||
|
become: true
|
||
|
become_method: su
|
||
|
gather_facts: false
|
||
|
vars:
|
||
|
become_password: vagrant
|
||
|
tasks:
|
||
|
- name: Shell
|
||
|
ansible.builtin.shell: |
|
||
|
mkdir -pm 700 /home/vagrant/.ssh
|
||
|
curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
||
|
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
||
|
chown -R vagrant:vagrant /home/vagrant/.ssh
|
||
|
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
|
||
|
chmod 0440 /etc/sudoers.d/vagrant
|