Skip to content

Commit f25c261

Browse files
committed
Adds task to add the gpg key to the VM
1 parent 5957485 commit f25c261

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
UBUNTU_LAB_IP=192.168.50.100
22
UBUNTU_LAB_CPU=2
3-
UBUNTU_LAB_DISK_SIZE=40GB
4-
UBUNTU_LAB_RAM=2048
3+
UBUNTU_LAB_DISK_SIZE=64GB
4+
UBUNTU_LAB_RAM=6144
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
# git name
2-
# git email
3-
# git config --global diff.ansible-vault.textconv "ansible-vault view"
1+
---
2+
- git_config:
3+
name: user.name
4+
scope: global
5+
value: "Renan Ben Moshe"
6+
7+
- git_config:
8+
name: user.email
9+
scope: global
10+
11+
12+
- git_config:
13+
name: diff.ansible-vault.textconv
14+
scope: global
15+
value: "ansible-vault view"
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
32
ssh_path: '/home/vagrant/.ssh'
43

54
ssh_files:
65
- { ssh_key: 'authorized_keys', mode: '0600' }
7-
- { ssh_key: 'id_rsa' , mode: '0600' }
8-
- { ssh_key: 'id_rsa.pub' , mode: '0664' }
6+
- { ssh_key: 'id_rsa' , mode: '0600' }
7+
- { ssh_key: 'id_rsa.pub' , mode: '0664' }
98
- { ssh_key: 'known_hosts' , mode: '0644' }

roles/apply-credentials/tasks/credentials.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@
2121
authorized_key:
2222
user: 'vagrant'
2323
state: present
24-
key: "{{ lookup('file', '{{ ssh_path }}/id_rsa.pub') }}"
24+
key: "{{ lookup('file', '{{ ssh_path }}/id_rsa.pub') }}"
25+
26+
- name: GPG - Import private Key
27+
become: yes
28+
command: gpg --import '/vagrant/roles/apply-credentials/files/gpg_key/privkey.asc'

0 commit comments

Comments
 (0)