added tags

This commit is contained in:
Tanguy MAZE
2018-12-14 12:51:20 +01:00
parent 2e94aefbc0
commit 338c41e8ca
3 changed files with 27 additions and 12 deletions

View File

@@ -16,21 +16,16 @@
dest: "/etc/ssh/"
owner: "root"
group: "root"
- name: "Install sudo"
apt:
name: ['sudo']
update_cache: "yes"
state: "present"
- name: "Add tanguy to sudoers"
user:
name: "tanguy"
groups: "sudo"
append: yes
tags: [ "ssh" ]
- name: "Restart ssh service"
service:
name: "ssh"
state: "restarted"
- name: "Upload public key for tanguy"
authorized_key:
user: "tanguy"
state: "present"
key: "{{ lookup('file', '/Users/tmaze/.ssh/id_rsa.pub') }}"
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
- name: "Restart networking service"
service:
name: "networking"