Skip to content

Commit

Permalink
Move the ssh key names to variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed May 28, 2020
1 parent c665ca3 commit be2ab1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deployment/playbooks/digital_ocean_droplet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
- vars/default.yml

tasks:
- openssh_keypair:
- name: Create an SSH Key Pair
openssh_keypair:
path: "{{ ssh_keys_path_docker }}/id_rsa"

- name: Create SSH key
- name: Upload SSH Key to Digital Ocean
digital_ocean_sshkey:
name: "ansible-tutorial-ssh-key"
name: "{{ ansible-tutorial-ssh-key }}"
ssh_pub_key: "{{ lookup('file', ssh_keys_path_docker + '/id_rsa.pub') }}"
state: present
register: docker_ssh_key
Expand Down
1 change: 1 addition & 0 deletions deployment/playbooks/vars/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ env_file_path_docker: /app/.env
ssh_keys_path_docker: /root/.ssh

digital_ocean_droplet_name: ansible-tutorial
digital_ocean_ssh_key_name: ansible-tutorial-ssh-key
digital_ocean_region: nyc3
digital_ocean_image: ubuntu-20-04-x64
digital_ocean_image_tag: ansible-tutorial-django
Expand Down

0 comments on commit be2ab1f

Please sign in to comment.