Bo's Oracle Station

查看: 1044|回复: 0

ANSIBLE ROLE下载GALAXY

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-8-17 23:06:05 | 显示全部楼层 |阅读模式
下载用的 YML:

  1. ---
  2. - src: https://github.com/novomatic-tech/ansible-role-bash-profile
  3.   scm: git
  4.   version: master
  5.   name: student.bash_profile
复制代码

  1. #ansible-galaxy install -r *.yml -p ./roles
  2. ---
  3. - name: user student.bash_profile role playbook
  4.   hosts: srvgroup
  5.   roles:
  6.     - student.bash_profile
  7.   vars:
  8.     affected_users:
  9.       - devops
  10.       - alex
  11.       - natasha
  12.   pre_tasks:
  13.   - name: Users Should Not Exists
  14.     user:
  15.       name: testuser1
  16.       state: absent
  17.       force: yes
  18.       remove: yes

  19.   post_tasks:
  20.   - name: Create Test User
  21.     user:
  22.       name: testuser1
  23.       state: present
  24.       password: "{{ 'redhat' | password_hash('sha512', 'mysecretsalt') }}"
复制代码

  1. https://releases.ansible.com/ansible-tower/setup-bundle/
复制代码

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-9 18:55 , Processed in 0.036895 second(s), 24 queries .

快速回复 返回顶部 返回列表