From e1fc6a114e23eafc709163d8e6e625c0db211fe5 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Nov 2017 15:40:30 +0100 Subject: Upgrade syntax to Ansible 2.4. --- all.yml | 22 +++++++++++----------- lib/modules/mysql_user2 | 8 ++++---- roles/IMAP/tasks/main.yml | 6 +++--- roles/common/tasks/main.yml | 36 ++++++++++++++++++------------------ roles/git/tasks/main.yml | 4 ++-- roles/lists/tasks/main.yml | 6 +++--- roles/webmail/tasks/main.yml | 4 ++-- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/all.yml b/all.yml index da5e6bc..fa3c85d 100644 --- a/all.yml +++ b/all.yml @@ -2,14 +2,14 @@ # Example: # ansible-playbook -i stage_vms all.yml -t rkhunter -- include: common.yml -- include: IMAP.yml -- include: MX.yml -- include: MSA.yml -- include: out.yml -- include: webmail.yml -- include: lists.yml -- include: git.yml -- include: wiki.yml -- include: bacula.yml -- include: munin.yml +- import_playbook: common.yml +- import_playbook: IMAP.yml +- import_playbook: MX.yml +- import_playbook: MSA.yml +- import_playbook: out.yml +- import_playbook: webmail.yml +- import_playbook: lists.yml +- import_playbook: git.yml +- import_playbook: wiki.yml +- import_playbook: bacula.yml +- import_playbook: munin.yml diff --git a/lib/modules/mysql_user2 b/lib/modules/mysql_user2 index 4188e8c..c3cc38f 100644 --- a/lib/modules/mysql_user2 +++ b/lib/modules/mysql_user2 @@ -412,16 +412,16 @@ def main(): module = AnsibleModule( argument_spec = dict( login_user=dict(default=None), - login_password=dict(default=None), + login_password=dict(default=None, no_log=True), login_host=dict(default="localhost"), - login_port=dict(default="3306"), + login_port=dict(default=3306, type='int'), login_unix_socket=dict(default=None), user=dict(required=True, aliases=['name']), - password=dict(default=None), + password=dict(default=None, no_log=True, type='str'), host=dict(default="localhost"), state=dict(default="present", choices=["absent", "present"]), priv=dict(default=None), - append_privs=dict(type="bool", default="no"), + append_privs=dict(default=False, type="bool"), check_implicit_admin=dict(default=False), auth_plugin=dict(default=None), soname=dict(default=None) diff --git a/roles/IMAP/tasks/main.yml b/roles/IMAP/tasks/main.yml index b26cb10..694fa69 100644 --- a/roles/IMAP/tasks/main.yml +++ b/roles/IMAP/tasks/main.yml @@ -1,15 +1,15 @@ --- -- include: imap.yml +- import_tasks: imap.yml tags: - imap - dovecot -- include: mda.yml +- import_tasks: mda.yml tags: - mda - mail - postfix ## TODO spam filter -#- include: spam.yml +#- import_tasks: spam.yml # tags: # - spam # - amavis diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index c63d7a4..aca16b6 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,37 +1,37 @@ --- -- include: sysctl.yml +- import_tasks: sysctl.yml tags: sysctl -- include: hosts.yml -- include: apt.yml +- import_tasks: hosts.yml +- import_tasks: apt.yml tags: apt - name: Install intel-microcode apt: pkg=intel-microcode when: "ansible_processor[0] | search('^(Genuine)?Intel.*') and not ansible_virtualization_role == 'guest'" tags: intel -- include: firewall.yml +- import_tasks: firewall.yml tags: - firewall - iptables -- include: stunnel.yml +- import_tasks: stunnel.yml tags: stunnel when: "'webmail' in group_names and 'LDAP-provider' not in group_names" -- include: samhain.yml +- import_tasks: samhain.yml tags: samhain -- include: auditd.yml +- import_tasks: auditd.yml tags: auditd -- include: rkhunter.yml +- import_tasks: rkhunter.yml tags: rkhunter -- include: clamav.yml +- import_tasks: clamav.yml tags: clamav -- include: fail2ban.yml +- import_tasks: fail2ban.yml tags: fail2ban -- include: smart.yml +- import_tasks: smart.yml tags: - smartmontools - smart when: "not ansible_virtualization_role == 'guest'" -- include: haveged.yml +- import_tasks: haveged.yml tags: - haveged - entropy @@ -48,24 +48,24 @@ command: gendhparam.sh /etc/ssl/dhparams.pem 2048 creates=/etc/ssl/dhparams.pem tags: genkey -- include: ipsec.yml +- import_tasks: ipsec.yml tags: - strongswan - ipsec when: "groups.all | length > 1" -- include: logging.yml +- import_tasks: logging.yml tags: logging -- include: ntp.yml +- import_tasks: ntp.yml tags: ntp -- include: mail.yml +- import_tasks: mail.yml tags: - mail - postfix -- include: bacula.yml +- import_tasks: bacula.yml tags: - bacula-fd - bacula -- include: munin-node.yml +- import_tasks: munin-node.yml tags: - munin-node - munin diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml index e24402a..f65824e 100644 --- a/roles/git/tasks/main.yml +++ b/roles/git/tasks/main.yml @@ -1,4 +1,4 @@ -- include: gitolite.yml +- import_tasks: gitolite.yml tags: gitolite -- include: cgit.yml +- import_tasks: cgit.yml tags: cgit diff --git a/roles/lists/tasks/main.yml b/roles/lists/tasks/main.yml index b43c948..6d53d82 100644 --- a/roles/lists/tasks/main.yml +++ b/roles/lists/tasks/main.yml @@ -1,13 +1,13 @@ -- include: mail.yml +- import_tasks: mail.yml tags: - postfix - mail -- include: nginx.yml +- import_tasks: nginx.yml tags: - nginx - www - web -- include: sympa.yml +- import_tasks: sympa.yml tags: - sympa - lists diff --git a/roles/webmail/tasks/main.yml b/roles/webmail/tasks/main.yml index cd9f0c7..210d277 100644 --- a/roles/webmail/tasks/main.yml +++ b/roles/webmail/tasks/main.yml @@ -1,9 +1,9 @@ -- include: ldap.yml +- import_tasks: ldap.yml when: "'LDAP-provider' not in group_names" tags: - ldap - stunnel -- include: roundcube.yml +- import_tasks: roundcube.yml tags: - roundcube - webmail -- cgit v1.2.3