infra-vagrant-host/ansible/tasks/vagrant.yml
2023-02-17 15:48:29 +01:00

32 lines
677 B
YAML

- name: Install Vagrant key
get_url:
url: https://apt.releases.hashicorp.com/gpg
dest: /etc/apt/trusted.gpg.d/vagrant.asc
- name: Ensure vagrant group exists
ansible.builtin.group:
name: vagrant
state: present
- name: Add sudoers file
ansible.builtin.copy:
src: files/etc.sudoers.d.vagrant
dest: /etc/sudoers.d/vagrant
owner: root
group: root
- name: Add Vagrant repository
apt_repository:
repo: >
deb
[signed-by=/etc/apt/trusted.gpg.d/vagrant.asc]
https://apt.releases.hashicorp.com bullseye main
state: present
update_cache: true
- name: Install Vagrant
apt:
name: vagrant
state: present
#