infra-vagrant-host/ansible/tasks/vagrant.yml

33 lines
677 B
YAML
Raw Normal View History

2023-02-17 14:48:29 +00:00
- 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
#