Skip to content
Snippets Groups Projects
Commit c31355a3 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

make sure deploy_user is sudoer, with no password asked in system setup

Former-commit-id: 5b03edeefda9ba5706dfd272059486e1b66cb837
parent c53f3e22
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,20 @@
- hosts: all
gather_facts: no
tasks:
- name: Make sure we have a 'wheel' group
become: true
group:
name: wheel
state: present
- name: Allow 'wheel' group to have passwordless sudo
become: true
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
- name: Create {{ deploy_user_name }} user
user: name={{ deploy_user_name }} generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
user: name={{ deploy_user_name }} groups=wheel append=yes state=present createhome=yes generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
become: true
- name: install git
yum: name=git state=present
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment