“Ansible Playbook zum festen passwortlosen sudo” Code-Antworten

Ansible Playbook zum festen passwortlosen sudo


- name: Make sure we have a 'wheel' group
  group:
    name: wheel
    state: present

- name: Allow 'wheel' group to have passwordless sudo
  lineinfile:
    dest: /etc/sudoers
    state: present
    regexp: '^%wheel'
    line: '%wheel ALL=(ALL) NOPASSWD: ALL'
    validate: 'visudo -cf %s'

- name: Add sudoers users to wheel group
  user:
    name=deployer
    groups=wheel
    append=yes
    state=present
    createhome=yes

- name: Set up authorized keys for the deployer user
  authorized_key: user=deployer key="{{item}}"
  with_file:
    - /home/railsdev/.ssh/id_rsa.pub

Mushy Mantis

Ansible Playbook zum festen passwortlosen sudo

---
- hosts: all
  tasks:
    - lineinfile:
        path: /etc/sudoers
        state: present
        regexp: '^%sudo'
        line: '%sudo ALL=(ALL) NOPASSWD: ALL'
        validate: 'visudo -cf %s'
Drab Dolphin

Ähnliche Antworten wie “Ansible Playbook zum festen passwortlosen sudo”

Fragen ähnlich wie “Ansible Playbook zum festen passwortlosen sudo”

Weitere verwandte Antworten zu “Ansible Playbook zum festen passwortlosen sudo” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen