2016-03-29 19 views
0

Ansible komut dosyasını kullanarak parola (nologin kullanıcısı) kullanmadan grup ve kullanıcı eklemem gerekiyor.Ansible kullanarak kullanıcı ve grup şifre olmadan nasıl eklenir?

aşağıdaki komutu çalıştırın: Bir nologin kullanıcı oluşturmak istiyorsanız Aşağıda

$ansible-playbook deploy_nagios_client.yml -i hosts -e hosts=qa1-jetty -v 

olarak belirlemeniz gerekir, main.yml

--- 

# Create Nagios User and Group 
    - name: Add group "nagios" 
    group: name=nagios 
    become: true 

    - name: Add user "nagios" 
    user: name=nagios groups=nagios password="" shell=/bin/bash append=yes comment="Nagios nologin User" state=present 
    become: true 

Result

cevap

0

olduğunu gibi shell tartışmaya Bu:

- name: Add user "nagios" 
    user: 
     name: nagios 
     groups: nagios 
     shell: /sbin/nologin 
     append: yes 
     comment: "Nagios nologin User" 
     state: present 
    become: true 
İlgili konular