Commit fd4122d0 authored by nanahira's avatar nanahira

update sudoers

parent 018ff95f
Pipeline #1334 passed with stage
in 3 minutes and 43 seconds
......@@ -3,6 +3,7 @@
user:
name: '{{ansible_user_id}}'
shell: /usr/bin/fish
when: ansible_user_id == "root" or not manual_fish_mode is defined
- name: 终端环境 fish omf
shell: curl -L http://get.oh-my.fish | fish
environment:
......
......@@ -5,11 +5,9 @@
when: not (not authorized_keys)
- name: sudoers
become: true
lineinfile:
path: /etc/sudoers
insertafter: 'EOF'
line: '{{ ansible_user_id }} ALL=(ALL:ALL) NOPASSWD: ALL'
validate: /usr/sbin/visudo -cf %s
copy:
dest: '/etc/sudoers.d/mycard_sudoers_{{ ansible_user_id }}'
content: '{{ ansible_user_id }} ALL=(ALL:ALL) NOPASSWD: ALL'
when: ansible_user_id != 'root'
- name: hostname
become: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment