Use monasca venv for influxdb setup

Instead of pip installing onto the host, we use the
influxdb in the monasca venv to do the influxdb database,
user, etc setup. This prevents interference between pip
installed packages and distribution packages, keeping the
line between host installed packages and venv installed
packages clean.

The venv is only deployed on the monasca_api servers, so
we change the group used for executing the tasks to the
right group for it to work.

Change-Id: I6e1f86a789f188dff611d522a3309a355f7cd8e8
This commit is contained in:
Jesse Pretorius 2018-08-19 16:47:33 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 30763bd5a0
commit 0218b5e5e1
2 changed files with 3 additions and 6 deletions

View File

@ -12,7 +12,9 @@
# limitations under the License.
- include: monasca_influxdb_setup.yml
when: inventory_hostname in groups['monasca_influxdb']
when: inventory_hostname in groups['monasca_api']
vars:
ansible_python_interpreter: "{{ monasca_bin }}/python"
- include: monasca_mysql_setup.yml
when: inventory_hostname in groups['monasca_api']

View File

@ -11,11 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Install influxdb libs
pip:
name: influxdb
state: present
- name: Create influxdb database
influxdb_database:
hostname: "{{ monasca_influxdb_host }}"