diff options
-rw-r--r-- | lib/modules/mysql_user2 (renamed from lib/modules/mysql_user) | 2 | ||||
-rw-r--r-- | roles/IMAP/tasks/spam.yml | 2 | ||||
-rw-r--r-- | roles/bacula-dir/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/common-SQL/tasks/main.yml | 8 | ||||
-rw-r--r-- | roles/lists/tasks/sympa.yml | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/modules/mysql_user b/lib/modules/mysql_user2 index 054698e..d10e3e0 100644 --- a/lib/modules/mysql_user +++ b/lib/modules/mysql_user2 @@ -3,41 +3,41 @@ # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. DOCUMENTATION = ''' --- -module: mysql_user +module: mysql_user2 short_description: Adds or removes a user from a MySQL database. description: - Adds or removes a user from a MySQL database. version_added: "0.6" options: name: description: - name of the user (role) to add or remove required: true default: null password: description: - set the user's password required: false default: null host: description: - the 'host' part of the MySQL username required: false default: localhost diff --git a/roles/IMAP/tasks/spam.yml b/roles/IMAP/tasks/spam.yml index b8ac466..06624dd 100644 --- a/roles/IMAP/tasks/spam.yml +++ b/roles/IMAP/tasks/spam.yml @@ -33,31 +33,31 @@ with_items: - spamassassin/local.cf - spamassassin/v310.pre - spamassassin/v320.pre notify: - Restart Amavis - name: Provision /etc/default/spamassassin lineinfile: dest=/etc/default/spamassassin regexp='^(\s*#)?\s*{{ item.var }}=' "line={{ item.var }}={{ item.value }}" owner=root group=root mode=0644 with_items: - { var: ENABLED, value: 0 } - { var: CRON, value: 1 } - name: Create a 'amavis' SQL user # This *must* be the user we run spamd as # See https://svn.apache.org/repos/asf/spamassassin/trunk/sql/README.bayes - mysql_user: > + mysql_user2: > name=amavis password= auth_plugin=auth_socket priv="spamassassin.awl: SELECT,INSERT,UPDATE,DELETE /spamassassin.bayes_seen: SELECT,INSERT, DELETE /spamassassin.bayes_token: SELECT,INSERT,UPDATE,DELETE /spamassassin.bayes_global_vars: SELECT /spamassassin.bayes_vars: SELECT,INSERT,UPDATE,DELETE /spamassassin.bayes_expire: SELECT,INSERT, DELETE" state=present notify: - Restart Amavis diff --git a/roles/bacula-dir/tasks/main.yml b/roles/bacula-dir/tasks/main.yml index 7bcf239..cee6fc2 100644 --- a/roles/bacula-dir/tasks/main.yml +++ b/roles/bacula-dir/tasks/main.yml @@ -65,42 +65,42 @@ mode=0644 register: r4 notify: - Restart stunnel - name: Start stunnel service: name=stunnel4 pattern=/usr/bin/stunnel4 state=started when: not (r1.changed or r2.changed or r3.changed or r4.changed) - meta: flush_handlers - name: Install bacula-director apt: pkg={{ item }} with_items: - bacula-console - bacula-director-mysql - name: Create a 'bacula' SQL user - mysql_user: name=bacula password= auth_plugin=auth_socket - state=present + mysql_user2: name=bacula password= auth_plugin=auth_socket + state=present notify: - Restart bacula-director # Create with: # echo bconsole $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir # echo $sd-sd $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir # echo $fd-fd $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir # # then add the password for each FD / SD: # echo $director-dir $password | sudo tee /etc/bacula/passwords-sd # echo $director-dir $password | sudo tee /etc/bacula/passwords-fd - name: Ensure /etc/bacula/passwords-dir exists file: path=/etc/bacula/passwords-dir state=file owner=bacula group=bacula mode=0600 - name: Configure bconsole template: src=etc/bacula/bconsole.conf.j2 dest=/etc/bacula/bconsole.conf diff --git a/roles/common-SQL/tasks/main.yml b/roles/common-SQL/tasks/main.yml index 9541be8..9064a68 100644 --- a/roles/common-SQL/tasks/main.yml +++ b/roles/common-SQL/tasks/main.yml @@ -11,46 +11,46 @@ - mysql-server - python-mysqldb # for the 'mysql_' munin plugin - libcache-cache-perl - name: Copy MySQL's configuration copy: src=etc/mysql/my.cnf dest=/etc/mysql/my.cnf owner=root group=root mode=0644 register: r notify: - Restart MySQL # We need to restart now and load the relevant authplugin before we # connect to the database. - meta: flush_handlers # XXX Dirty fix for #742046 - name: Force root to use UNIX permissions - mysql_user: name=root password= auth_plugin=auth_socket - state=present + mysql_user2: name=root password= auth_plugin=auth_socket + state=present - name: Disallow anonymous and TCP/IP root login - mysql_user: name={{ item.name|default('') }} host={{ item.host }} - state=absent + mysql_user2: name={{ item.name|default('') }} host={{ item.host }} + state=absent with_items: - { host: '{{ inventory_hostname_short }}' } - { host: 'localhost' } - { host: '127.0.0.1'} - { host: '::1'} - { name: root, host: '{{ inventory_hostname_short }}' } - { name: root, host: '127.0.0.1'} - { name: root, host: '::1'} - name: Start MySQL service: name=mysql state=started - name: Install 'mysql_' Munin wildcard plugin file: src=/usr/share/munin/plugins/mysql_ dest=/etc/munin/plugins/mysql_{{ item }} owner=root group=root state=link force=yes with_items: # sudo /usr/share/munin/plugins/mysql_ suggest diff --git a/roles/lists/tasks/sympa.yml b/roles/lists/tasks/sympa.yml index 4505f54..00e5d9c 100644 --- a/roles/lists/tasks/sympa.yml +++ b/roles/lists/tasks/sympa.yml @@ -1,28 +1,28 @@ - apt: pkg={{ item }} install_recommends=no with_items: - mysql-server - sympa - name: Make the 'sympa' MySQL user use auth_socket - mysql_user: name=sympa password= auth_plugin=auth_socket - state=present + mysql_user2: name=sympa password= auth_plugin=auth_socket + state=present # XXX We want to change the retun-path for sendpasswd notices from # 'sympa-request@$robot' to 'noreply@fripost.org'. # * /usr/lib/cgi-bin/sympa/wwsympa.fcgi # do_requestpasswd, do_subrequest: add $param->{'return_path'}='noreply@fripost.org'; # * List::send_global_file # $data->{'return_path'} //= &Conf::get_robot_conf($robot, 'request'); # See #787946. - name: Configure Sympa copy: src=etc/sympa/{{ item }} dest=/etc/sympa/{{ item }} owner=root group=sympa mode=0644 with_items: - sympa.conf - wwsympa.conf - topics.conf register: r1 notify: - Restart Sympa |