Ansible 创建用户配置密码通过哈希加密的方式

创建用户配置密码通过哈希加密的方式

 

 

[libin@libin ansible]$ vim rhca447-26.yaml

---

- name: create user and set

  hosts: web

  tasks:

  - name: create user

    user:

      name: alex01

      password: "{{ 'helloworld' | password_hash('sha512') }}"

      state: present

 

[libin@libin ansible]$ ansible-playbook rhca447-26.yaml

 

 

posted @ 2022-10-16 15:11  LB_运维技术  阅读(417)  评论(0编辑  收藏  举报