1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

`ansible-galaxy install ...` をまとめて実行する playbook ...

Posted at

:books:

install-required-roles.yml
- name: Install required roles
  gather_facts: false
  hosts: all
  vars:
    roles:
    - role_file: "./requirements.yml"
      roles_path: "./roles-must-be-installed/"
    - role_file: "./requirements-x.yml"
      roles_path: "./roles-must-be-installed-x/"
    - role_file: "./requirements-x.yml"
      roles_path: "./roles-must-be-installed-xx/"
  tasks:
    - name: Ensure multiple roles be installed according to 'Role Requirements Files'
      local_action: command ansible-galaxy install --force --role-file {{ item.role_file }} --roles-path {{ item.roles_path }}
      run_once: true
      with_items: roles

#:dancer: ansible-playbook -i a,b,c,d,e install-required-roles.yml

感想

勢いで書いてみただけ

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?