Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double quotation mark within double quoted string value #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
language: python
python: "2.7"

# Use the new container infrastructure
sudo: false

# Install ansible
addons:
apt:
packages:
- python-pip

install:
# Install ansible
- pip install ansible>=2.0

# Check ansible version
- ansible --version

# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg

script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- name: Install the repository for Ubuntu mongodb
apt_repository: repo="deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" state=present
when: ansible_os_family == "Debian"

- name: Install the libselinux module
yum: name=libselinux-python state=installed
when: ansible_os_family == "RedHat"
Expand All @@ -33,7 +33,7 @@
user: name={{ mongo_user }} comment="MongoD"

- name: make sure the hostname is available in /etc/hosts
lineinfile: dest=/etc/hosts regexp="{{ ansible_hostname }}" line="{{ hostvars[inventory_hostname].ansible_default_ipv4.address + " " + ansible_hostname }}" state=present
lineinfile: dest=/etc/hosts regexp="{{ ansible_hostname }}" line="{{ hostvars[inventory_hostname].ansible_default_ipv4.address + ' ' + ansible_hostname }}" state=present

- name: Create the data directory for the mongod
file: path={{ mongod_datadir_prefix }} owner={{ mongo_user }} group={{ mongo_group }} state=directory
Expand Down Expand Up @@ -85,5 +85,5 @@
when: mongod_replication

- name: Initialize the replication set
shell: /usr/bin/mongo --port "{{ mongod_port }}" /tmp/repset_init.js
shell: /usr/bin/mongo --port "{{ mongod_port }}" /tmp/repset_init.js
when: mongod_replication and (mongod_repl_master == inventory_hostname or mongod_repl_master == ansible_hostname)
1 change: 1 addition & 0 deletions tests/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
localhost
5 changes: 5 additions & 0 deletions tests/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- mongo_mongod