botang 发表于 2020-8-17 23:06:05

ANSIBLE ROLE下载GALAXY

下载用的 YML:

---
- src: https://github.com/novomatic-tech/ansible-role-bash-profile
scm: git
version: master
name: student.bash_profile


#ansible-galaxy install -r *.yml -p ./roles
---
- name: user student.bash_profile role playbook
hosts: srvgroup
roles:
    - student.bash_profile
vars:
    affected_users:
      - devops
      - alex
      - natasha
pre_tasks:
- name: Users Should Not Exists
    user:
      name: testuser1
      state: absent
      force: yes
      remove: yes

post_tasks:
- name: Create Test User
    user:
      name: testuser1
      state: present
      password: "{{ 'redhat' | password_hash('sha512', 'mysecretsalt') }}"


https://releases.ansible.com/ansible-tower/setup-bundle/
页: [1]
查看完整版本: ANSIBLE ROLE下载GALAXY