Skip to content

Commit

Permalink
Merge pull request #9 from Oefenweb/fix-install
Browse files Browse the repository at this point in the history
Fix install
  • Loading branch information
tersmitten authored Feb 3, 2023
2 parents a48498b + 12bd8dc commit 5931095
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
warn_list:
- role-name
- name[play]
- name[casing]
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ platforms:
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /var/lib/containerd
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
Expand Down
6 changes: 4 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# tasks file
---
- ansible.builtin.import_tasks: repository.yml
- name: repository
ansible.builtin.import_tasks: repository.yml
tags:
- configuration
- vagrant
- vagrant-repository

- ansible.builtin.import_tasks: install.yml
- name: install
ansible.builtin.import_tasks: install.yml
tags:
- configuration
- vagrant
Expand Down
22 changes: 16 additions & 6 deletions tasks/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@
tags:
- vagrant-repository-install-dependencies

- name: repository | add public key
ansible.builtin.apt_key:
id: DA418C88A3219F7B
url: https://apt.releases.hashicorp.com/gpg
state: present
- name: create (keyrings) directory
ansible.builtin.file:
path: "{{ vagrant_keyring_dst | dirname }}"
state: directory
owner: root
group: root
mode: 0755
tags:
- vagrant-repository-keyrings-directory-create

- name: download (keyring) file # noqa command-instead-of-module risky-shell-pipe
ansible.builtin.shell: >
wget -O- {{ vagrant_keyring_src }} | gpg --dearmor | tee {{ vagrant_keyring_dst }}
args:
creates: "{{ vagrant_keyring_dst }}"
tags:
- vagrant-repository-public-key
- vagrant-repository-keyring-file-download

- name: repository | add
ansible.builtin.apt_repository:
Expand Down
6 changes: 5 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# vars file
---
vagrant_keyring_src: https://apt.releases.hashicorp.com/gpg
vagrant_keyring_dst: /usr/share/keyrings/hashicorp-archive-keyring.gpg
vagrant_repositories:
- type: deb
- type: "deb [signed-by={{ vagrant_keyring_dst }}]"
url: "https://apt.releases.hashicorp.com {{ ansible_distribution_release }}"
component: main

vagrant_dependencies_pre:
- software-properties-common
- dirmngr
- apt-transport-https
- wget
- coreutils

vagrant_dependencies:
- vagrant

0 comments on commit 5931095

Please sign in to comment.