M
M
Mikhail Beloshitsky2016-01-10 19:37:57
Ansible
Mikhail Beloshitsky, 2016-01-10 19:37:57

How to transfer a role between nodes?

For example, I have a configuration:

- name: Узел 1
  hosts: node1
  roles:
    - base-linux
    - redmine

- name: Узел 2
  hosts: node2
  roles:
    - base-linux
    - monitoring

Then I wanted to transfer the redmine to node 2 in order to free up 1 for other tasks. To do this, you need to install it on node 2 and remove it on node 1. By writing this:
- name: Узел 1
  hosts: node1
  roles:
    - base-linux

- name: Узел 2
  hosts: node2
  roles:
    - base-linux
    - monitoring
    - redmine

on node 2, of course, it will be installed, but what about the removal on node 1?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-01-11
@opium

write a role to delete redmine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question