Skip to content

Commit

Permalink
feat: hashicorp packages added
Browse files Browse the repository at this point in the history
  • Loading branch information
kakashi committed Feb 7, 2022
1 parent ee96a29 commit 2ada280
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playbook.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- hosts: localhost
connection: local
gather_facts: no
become: true
gather_facts: yes
become: yes
roles:
- common
- docker
# - common
- hashicorp
Empty file.
1 change: 1 addition & 0 deletions roles/hashicorp/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- include: services.yml
Empty file.
Empty file added roles/hashicorp/meta/main.yml
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions roles/hashicorp/tasks/dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: Install docker packages
apt:
update_cache: yes
name: "{{item}}"
state: present

with_items:
- gnupg
- software-properties-common
- curl
register: dependencies

3 changes: 3 additions & 0 deletions roles/hashicorp/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# - include: dependencies.yml
- include: repository.yml
- include: config.yml
24 changes: 24 additions & 0 deletions roles/hashicorp/tasks/repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- name: import the terraform apt key
apt_key:
url: https://apt.releases.hashicorp.com/gpg
state: present
become: true

- name: Add terraform repository into sources list
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://apt.releases.hashicorp.com {{ansible_distribution_release}} main"
state: present
filename: hashicorp

- name: Install Hashicorp Packages
apt:
update_cache: yes
name: "{{item}}"
state: present
become_user: root
with_items:
- terraform
- vagrant
- packer
register: packages

Empty file.
Empty file added roles/hashicorp/vars/main.yml
Empty file.

0 comments on commit 2ada280

Please sign in to comment.