From 630e7739624ceee890f8309f4ce159e7604df564 Mon Sep 17 00:00:00 2001 From: Sergei Antipov Date: Sun, 17 Apr 2016 20:40:20 +0600 Subject: [PATCH] Deleted unneeded parts --- README.md | 19 +++---------------- defaults/main.yml | 11 ----------- tasks/configure.yml | 27 --------------------------- templates/logrotate.conf.j2 | 8 -------- tests/site.yml | 16 +--------------- 5 files changed, 4 insertions(+), 77 deletions(-) delete mode 100644 templates/logrotate.conf.j2 diff --git a/README.md b/README.md index d08db04..40aea50 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,9 @@ mongodb_package: mongodb-org # I will recommend you to use latest version of MongoDB. mongodb_version: "3.2" -mongodb_force_wait_for_port: false # When not forced, the role will wait for mongod port to become available only with systemd -mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager -mongodb_pymongo_pip_version: "3.2.2" - -mongodb_disable_thp: true - +mongodb_force_wait_for_port: false # When not forced, the role will wait for mongod port to become available only with systemd +mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager +mongodb_user_update_password: "on_create" # MongoDB user password update default policy mongodb_manage_service: true mongodb_user: mongodb @@ -77,16 +74,6 @@ mongodb_mms_group_id: "" mongodb_mms_api_key: "" mongodb_mms_base_url: https://mms.mongodb.com -# Log rotation -mongodb_logrotate: true # Rotate mongodb logs. -mongodb_logrotate_options: - - compress - - copytruncate - - daily - - dateext - - rotate 7 - - size 10M - # password for inter-process authentication # please regenerate this file on production environment with command 'openssl rand -base64 741' mongodb_keyfile_content: | diff --git a/defaults/main.yml b/defaults/main.yml index 3919002..561aae3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,7 +7,6 @@ mongodb_apt_key_id: "{{ 'EA312927' if mongodb_version[0:3] == '3.2' else '7F0CEB mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager mongodb_force_wait_for_port: false -mongodb_disable_thp: true mongodb_user_update_password: "on_create" # MongoDB user password update default policy mongodb_manage_service: true @@ -62,16 +61,6 @@ mongodb_mms_group_id: "" mongodb_mms_api_key: "" mongodb_mms_base_url: https://mms.mongodb.com -# Log rotation -mongodb_logrotate: true # Rotate mongodb logs. -mongodb_logrotate_options: - - compress - - copytruncate - - daily - - dateext - - rotate 7 - - size 10M - # password for inter-process authentication # please regenerate this file on production environment with command 'openssl rand -base64 741' mongodb_keyfile_content: | diff --git a/tasks/configure.yml b/tasks/configure.yml index 80446aa..2604b4b 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -9,10 +9,6 @@ mode: 0600 when: mongodb_replication_replset and mongodb_replication_replset != '' -- name: Configure log rotation - template: src=logrotate.conf.j2 dest=/etc/logrotate.d/mongodb.conf - when: mongodb_logrotate - - name: set mongodb gid group: name=mongodb gid={{ mongodb_gid }} state=present when: mongodb_gid @@ -40,29 +36,6 @@ template: src=mongod.conf.j2 dest=/etc/mongod.conf backup=yes owner=root group=root mode=0644 register: config_result -- name: Install sysfsutils package - apt: name=sysfsutils state=present - when: ansible_os_family == 'Debian' and mongodb_disable_thp - -- name: Create /etc/sysfs.d direcroty - file: - path: /etc/sysfs.d - group: root - state: directory - mode: 0755 - owner: root - when: ansible_os_family == 'Debian' and mongodb_disable_thp - -- name: Create sysfs config - copy: - src: hugepages.conf - dest: /etc/sysfs.d/hugepages.conf - owner: root - group: root - mode: 0644 - when: ansible_os_family == 'Debian' and mongodb_disable_thp - notify: restart sysfsutils - - name: mongodb restart service: name={{ mongodb_daemon_name }} state=restarted when: config_result|changed and mongodb_manage_service diff --git a/templates/logrotate.conf.j2 b/templates/logrotate.conf.j2 deleted file mode 100644 index e98d622..0000000 --- a/templates/logrotate.conf.j2 +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Ansible for {{ ansible_fqdn }} -# Do NOT modify this file by hand! - -{{ mongodb_systemlog_path }} { -{% for option in mongodb_logrotate_options %} - {{ option }} -{% endfor %} -} diff --git a/tests/site.yml b/tests/site.yml index 12e64e7..9af01d9 100644 --- a/tests/site.yml +++ b/tests/site.yml @@ -22,18 +22,4 @@ roles: - role: greendayonfire.mongodb when: "'mongo' in group_names" - -- hosts: localhost - become: no - gather_facts: no - tasks: - - name: Run MongoDB cluster in Docker - docker: - name: "{{ item }}" - image: "{{ image_name }}" - command: "/sbin/init" - state: absent - with_items: - - mongo1 - - mongo2 - - mongo3 +