i have duplicated vars in group_vars file. need different roles. example:
games: - name: game1 host: game1.com mongodb_user: - {db: "mydb", user: "user1", pass: "pass1" } - name: game2 host: game2.com mongodb_user: - {db: "mydb", user: "user2", pass: "pass2" } mongodb_users: - {db: "mydb", user: "user1", pass: "pass1" } - {db: "mydb", user: "user2", pass: "pass2" }
can use links declare mongodb_users?
you can assign value of variables other variables. should able write this:
mongodb_users: - "{{ games[0].mongodb_user }}" - "{{ games[1].mongodb_user }}"
Comments
Post a Comment