Fix warnings
This commit is contained in:
parent
bd80043e76
commit
2aa63f5f16
10
.travis.yml
10
.travis.yml
|
@ -88,9 +88,13 @@ before_install:
|
||||||
- sudo pip install docker-py==1.5.0
|
- sudo pip install docker-py==1.5.0
|
||||||
# Pull docker image or build it
|
# Pull docker image or build it
|
||||||
- >
|
- >
|
||||||
if [ -f tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION} ]; then
|
if [ -f tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION} ]
|
||||||
sudo docker build --rm=true --file=tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION}
|
then
|
||||||
--tag ${DISTRIBUTION}:${DIST_VERSION} tests; else sudo docker pull ${DISTRIBUTION}:${DIST_VERSION}; fi
|
sudo docker build --rm=true --file=tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION}
|
||||||
|
--tag ${DISTRIBUTION}:${DIST_VERSION} tests
|
||||||
|
else
|
||||||
|
sudo docker pull ${DISTRIBUTION}:${DIST_VERSION}
|
||||||
|
fi
|
||||||
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
|
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -4,10 +4,10 @@ dependencies: []
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Sergei Antipov
|
author: Sergei Antipov
|
||||||
company: 2GIS
|
company: Self-employed
|
||||||
description: Manage MongoDB with authentication and replica sets
|
description: Manage MongoDB with authentication and replica sets
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
|
|
|
@ -32,8 +32,9 @@
|
||||||
|
|
||||||
- name: Create log if missing
|
- name: Create log if missing
|
||||||
file: state=touch dest={{ mongodb_systemlog_path }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
file: state=touch dest={{ mongodb_systemlog_path }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
||||||
when: logfile_stat is defined and not logfile_stat.stat.exists
|
when: ( logfile_stat is defined
|
||||||
when: mongodb_systemlog_destination == "file"
|
and not logfile_stat.stat.exists
|
||||||
|
and mongodb_systemlog_destination == "file" )
|
||||||
|
|
||||||
- name: Ensure dbpath directory
|
- name: Ensure dbpath directory
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
stat: path=/sbin/init
|
stat: path=/sbin/init
|
||||||
register: sbin_init
|
register: sbin_init
|
||||||
changed_when: false
|
changed_when: false
|
||||||
always_run: yes # side-effect free, so it can be run in check-mode as well
|
check_mode: no
|
||||||
|
|
||||||
- name: Establish some role-related facts
|
- name: Establish some role-related facts
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -7,15 +7,15 @@
|
||||||
- "{{ ansible_os_family }}.yml"
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: Include installation on Debian-based OS
|
- name: Include installation on Debian-based OS
|
||||||
include: "install.{{ ansible_os_family | lower }}.yml"
|
include_tasks: "install.{{ ansible_os_family | lower }}.yml"
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include configuration.yml
|
- name: Include configuration.yml
|
||||||
include: configure.yml
|
include_tasks: configure.yml
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include replication and auth configuration
|
- name: Include replication and auth configuration
|
||||||
include: replication_init_auth.yml
|
include_tasks: replication_init_auth.yml
|
||||||
when: ( mongodb_replication_replset
|
when: ( mongodb_replication_replset
|
||||||
and mongodb_replication_replset != ''
|
and mongodb_replication_replset != ''
|
||||||
and mongodb_security_authorization == 'enabled'
|
and mongodb_security_authorization == 'enabled'
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include replication configuration
|
- name: Include replication configuration
|
||||||
include: replication.yml
|
include_tasks: replication.yml
|
||||||
when: mongodb_replication_replset and mongodb_replication_replset != ''
|
when: mongodb_replication_replset and mongodb_replication_replset != ''
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
|
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
|
||||||
register: mongodb_user_admin_check
|
register: mongodb_user_admin_check
|
||||||
changed_when: false
|
changed_when: false
|
||||||
always_run: yes # side-effect free, so it can be run in check-mode as well
|
check_mode: no
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: ( mongodb_security_authorization == 'enabled'
|
when: ( mongodb_security_authorization == 'enabled'
|
||||||
and (not mongodb_replication_replset
|
and (not mongodb_replication_replset
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include authorization configuration
|
- name: Include authorization configuration
|
||||||
include: auth_initialization.yml
|
include_tasks: auth_initialization.yml
|
||||||
when: ( mongodb_security_authorization == 'enabled'
|
when: ( mongodb_security_authorization == 'enabled'
|
||||||
and (not mongodb_replication_replset
|
and (not mongodb_replication_replset
|
||||||
or mongodb_replication_replset == '')
|
or mongodb_replication_replset == '')
|
||||||
|
@ -88,6 +88,6 @@
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
||||||
- name: Include MMS Agent configuration
|
- name: Include MMS Agent configuration
|
||||||
include: mms-agent.yml
|
include_tasks: mms-agent.yml
|
||||||
when: mongodb_mms_api_key != ""
|
when: mongodb_mms_api_key != ""
|
||||||
tags: [mongodb]
|
tags: [mongodb]
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
register: mongodb_replica_init
|
register: mongodb_replica_init
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- include: auth_initialization.yml
|
- include_tasks: auth_initialization.yml
|
||||||
when: mongodb_replica_init|failed
|
when: mongodb_replica_init|failed
|
||||||
|
|
||||||
- name: Replication configuration | 2nd Pt
|
- name: Replication configuration | 2nd Pt
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run MongoDB cluster in Docker
|
- name: Run MongoDB cluster in Docker
|
||||||
docker:
|
docker_container:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
image: "{{ image_name }}"
|
image: "{{ image_name }}"
|
||||||
command: "/sbin/init"
|
command: "/sbin/init"
|
||||||
|
@ -31,4 +31,3 @@
|
||||||
roles:
|
roles:
|
||||||
- role: greendayonfire.mongodb
|
- role: greendayonfire.mongodb
|
||||||
when: "'mongo_replicas' in group_names"
|
when: "'mongo_replicas' in group_names"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue