From bd690719471952bc15e4ad2b008482e742f8619d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 9 Aug 2018 17:48:03 +0200 Subject: [PATCH] Refactor: include: ==> import_tasks: --- ansible_ppa/tasks/main.yml | 4 +-- apache/tasks/main.yml | 10 +++---- couchbase/tasks/main.yml | 6 ++-- couchdb/tasks/main.yml | 6 ++-- dnet_user_services_perms/tasks/main.yml | 14 +++++----- docker/tasks/main.yml | 2 +- drupal-org/tasks/main.yml | 6 ++-- fail2ban/tasks/main.yml | 4 +-- foreman/tasks/main.yml | 2 +- haproxy/tasks/main.yml | 10 +++---- jetty-apache/tasks/main.yml | 4 +-- jetty/tasks/main.yml | 2 +- mongodb-org-3/tasks/main.yml | 4 +-- mongodb-org/tasks/main.yml | 4 +-- mysql/tasks/main.yml | 12 ++++---- nginx/tasks/main.yml | 12 ++++---- openvpn/tasks/main.yml | 4 +-- postgresql/tasks/main.yml | 28 +++++++++---------- redmine/tasks/main.yml | 16 +++++------ .../smartgears_egi_image/tasks/main.yml | 2 +- ssh-keys/tasks/main.yml | 4 +-- tomcat-apache-requirements/tasks/main.yml | 4 +-- 22 files changed, 80 insertions(+), 80 deletions(-) diff --git a/ansible_ppa/tasks/main.yml b/ansible_ppa/tasks/main.yml index 97007007..ffb4d35e 100644 --- a/ansible_ppa/tasks/main.yml +++ b/ansible_ppa/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include: ansible-packages.yml -- include: ansible-config.yml +- import_tasks: ansible-packages.yml +- import_tasks: ansible-config.yml \ No newline at end of file diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index b0984c8f..2370761e 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -1,8 +1,8 @@ --- -- include: apache-ppa.yml -- include: apache.yml -- include: apache-modules.yml -- include: apache-basic-auth.yml +- import_tasks: apache-ppa.yml +- import_tasks: apache.yml +- import_tasks: apache-modules.yml +- import_tasks: apache-basic-auth.yml when: apache_basic_auth -- include: apache-letsencrypt.yml +- import_tasks: apache-letsencrypt.yml when: letsencrypt_acme_install is defined and letsencrypt_acme_install diff --git a/couchbase/tasks/main.yml b/couchbase/tasks/main.yml index 8de0d4fd..71bf3981 100644 --- a/couchbase/tasks/main.yml +++ b/couchbase/tasks/main.yml @@ -1,6 +1,6 @@ --- -- include: couchbase.yml -- include: swappiness.yml -- include: ganglia-plugin.yml +- import_tasks: couchbase.yml +- import_tasks: swappiness.yml +- import_tasks: ganglia-plugin.yml when: ganglia_enabled diff --git a/couchdb/tasks/main.yml b/couchdb/tasks/main.yml index a561252d..5a470d72 100644 --- a/couchdb/tasks/main.yml +++ b/couchdb/tasks/main.yml @@ -1,7 +1,7 @@ --- -- include: couchdb-1.yml +- import_tasks: couchdb-1.yml when: couchdb_use_old_package -- include: couchdb-2.yml +- import_tasks: couchdb-2.yml when: not couchdb_use_old_package -- include: ganglia-plugin.yml +- import_tasks: ganglia-plugin.yml when: ganglia_enabled diff --git a/dnet_user_services_perms/tasks/main.yml b/dnet_user_services_perms/tasks/main.yml index 2198621a..2938a368 100644 --- a/dnet_user_services_perms/tasks/main.yml +++ b/dnet_user_services_perms/tasks/main.yml @@ -1,12 +1,12 @@ --- -- include: dnet-groups.yml -- include: sudo-config.yml -- include: dnet-other-services-users.yml +- import_tasks: dnet-groups.yml +- import_tasks: sudo-config.yml +- import_tasks: dnet-other-services-users.yml when: dnet_other_services_users is defined -- include: dnet-data-dirs.yml +- import_tasks: dnet-data-dirs.yml when: dnet_standard_installation -- include: dnet-users-data-dirs.yml +- import_tasks: dnet-users-data-dirs.yml when: dnet_users_data_directories is defined -- include: dnet-additional-packages.yml -- include: dnet-tomcat-acls.yml +- import_tasks: dnet-additional-packages.yml +- import_tasks: dnet-tomcat-acls.yml when: dnet_standard_installation diff --git a/docker/tasks/main.yml b/docker/tasks/main.yml index 476c5896..e329ec11 100644 --- a/docker/tasks/main.yml +++ b/docker/tasks/main.yml @@ -1,5 +1,5 @@ --- -- include: pkgs.yml +- import_tasks: pkgs.yml - name: Enable Docker TCP on local bridge (for docker swarm) action: configfile path=/etc/default/docker syntax=shell key=DOCKER_OPTS value="\"-H tcp://172.17.42.1:2375 -H unix:///var/run/docker.sock\"" diff --git a/drupal-org/tasks/main.yml b/drupal-org/tasks/main.yml index a13a7880..e7b8c2ec 100644 --- a/drupal-org/tasks/main.yml +++ b/drupal-org/tasks/main.yml @@ -1,6 +1,6 @@ --- -- include: drupal-main.yml +- import_tasks: drupal-main.yml when: drupal_install -- include: drupal-utility.yml -- include: drush.yml +- import_tasks: drupal-utility.yml +- import_tasks: drush.yml when: drupal_install_drush diff --git a/fail2ban/tasks/main.yml b/fail2ban/tasks/main.yml index 5f9f82f9..510e6558 100644 --- a/fail2ban/tasks/main.yml +++ b/fail2ban/tasks/main.yml @@ -1,5 +1,5 @@ --- -- include: fail2ban.yml +- import_tasks: fail2ban.yml when: has_fail2ban -- include: fail2ban-rules.yml +- import_tasks: fail2ban-rules.yml when: has_fail2ban diff --git a/foreman/tasks/main.yml b/foreman/tasks/main.yml index ad5671ec..dbb4ae37 100644 --- a/foreman/tasks/main.yml +++ b/foreman/tasks/main.yml @@ -1,3 +1,3 @@ --- -- include: foreman-packages.yml +- import_tasks: foreman-packages.yml diff --git a/haproxy/tasks/main.yml b/haproxy/tasks/main.yml index d5e3fce9..a24b731e 100644 --- a/haproxy/tasks/main.yml +++ b/haproxy/tasks/main.yml @@ -1,18 +1,18 @@ --- -- include: haproxy-service.yml -- include: haproxy-letsencrypt.yml +- import_tasks: haproxy-service.yml +- import_tasks: haproxy-letsencrypt.yml when: - haproxy_letsencrypt_managed - letsencrypt_install is defined -- include: haproxy-letsencrypt-acmetool.yml +- import_tasks: haproxy-letsencrypt-acmetool.yml when: - haproxy_letsencrypt_managed - letsencrypt_acme_install is defined -- include: haproxy-ssl.yml +- import_tasks: haproxy-ssl.yml when: - haproxy_letsencrypt_managed -- include: haproxy-nagios.yml +- import_tasks: haproxy-nagios.yml when: - nagios_enabled is defined - nagios_enabled diff --git a/jetty-apache/tasks/main.yml b/jetty-apache/tasks/main.yml index c2545b29..bcde4340 100644 --- a/jetty-apache/tasks/main.yml +++ b/jetty-apache/tasks/main.yml @@ -1,3 +1,3 @@ --- -- include: apache.yml -- include: jetty.yml +- import_tasks: apache.yml +- import_tasks: jetty.yml diff --git a/jetty/tasks/main.yml b/jetty/tasks/main.yml index bf995797..bf81487a 100644 --- a/jetty/tasks/main.yml +++ b/jetty/tasks/main.yml @@ -1,2 +1,2 @@ --- -- include: jetty.yml +- import_tasks: jetty.yml diff --git a/mongodb-org-3/tasks/main.yml b/mongodb-org-3/tasks/main.yml index c3ad3de4..0211bd0e 100644 --- a/mongodb-org-3/tasks/main.yml +++ b/mongodb-org-3/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include: mongodb.yml -- include: ganglia-plugin.yml +- import_tasks: mongodb.yml +- import_tasks: ganglia-plugin.yml when: ganglia_enabled diff --git a/mongodb-org/tasks/main.yml b/mongodb-org/tasks/main.yml index c3ad3de4..0211bd0e 100644 --- a/mongodb-org/tasks/main.yml +++ b/mongodb-org/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include: mongodb.yml -- include: ganglia-plugin.yml +- import_tasks: mongodb.yml +- import_tasks: ganglia-plugin.yml when: ganglia_enabled diff --git a/mysql/tasks/main.yml b/mysql/tasks/main.yml index ebd97c5d..d3734d9f 100644 --- a/mysql/tasks/main.yml +++ b/mysql/tasks/main.yml @@ -1,12 +1,12 @@ --- -- include: packages.yml -- include: mysql-conf.yml +- import_tasks: packages.yml +- import_tasks: mysql-conf.yml when: mysql_enabled -- include: manage-mysql-service.yml -- include: configure_root_access.yml +- import_tasks: manage-mysql-service.yml +- import_tasks: configure_root_access.yml when: mysql_enabled -- include: manage_my_db.yml +- import_tasks: manage_my_db.yml when: mysql_enabled -- include: mysql-backup.yml +- import_tasks: mysql-backup.yml when: mysql_enabled diff --git a/nginx/tasks/main.yml b/nginx/tasks/main.yml index 2d2c8ca8..4bbac35f 100644 --- a/nginx/tasks/main.yml +++ b/nginx/tasks/main.yml @@ -1,12 +1,12 @@ --- -- include: nginx.yml -- include: nginx-config.yml -- include: nginx-virtualhosts.yml +- import_tasks: nginx.yml +- import_tasks: nginx-config.yml +- import_tasks: nginx-virtualhosts.yml when: nginx_use_common_virthost -- include: nginx-letsencrypt.yml +- import_tasks: nginx-letsencrypt.yml when: letsencrypt_acme_install is defined and letsencrypt_acme_install -- include: basic-auth.yml -- include: pam-ldap.yml +- import_tasks: basic-auth.yml +- import_tasks: pam-ldap.yml - name: Ensure that the webserver is running and enabled at boot time service: name=nginx state=started enabled=yes diff --git a/openvpn/tasks/main.yml b/openvpn/tasks/main.yml index 5eac2106..04cd35f8 100644 --- a/openvpn/tasks/main.yml +++ b/openvpn/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include: openvpn.yml -- include: letsencrypt-openvpn.yml +- import_tasks: openvpn.yml +- import_tasks: letsencrypt-openvpn.yml when: openvpn_letsencrypt_managed diff --git a/postgresql/tasks/main.yml b/postgresql/tasks/main.yml index f44fba2c..51b98e91 100644 --- a/postgresql/tasks/main.yml +++ b/postgresql/tasks/main.yml @@ -1,39 +1,39 @@ --- -- include: postgresql_org_repo.yml +- import_tasks: postgresql_org_repo.yml when: pg_use_postgresql_org_repo -- include: packages.yml +- import_tasks: packages.yml when: psql_postgresql_install -- include: postgis.yml +- import_tasks: postgis.yml when: postgres_install_gis_extensions -- include: postgresql-config.yml +- import_tasks: postgresql-config.yml when: psql_postgresql_install -- include: postgresql-ssl-config.yml +- import_tasks: postgresql-ssl-config.yml when: psql_postgresql_install -- include: psql-kernel-sharedmem.yml +- import_tasks: psql-kernel-sharedmem.yml when: - psql_postgresql_install - psql_set_shared_memory -- include: configure-access.yml +- import_tasks: configure-access.yml when: - psql_postgresql_install - psql_db_data is defined -- include: postgresql-service-status.yml +- import_tasks: postgresql-service-status.yml when: psql_postgresql_install -- include: postgres_pgpool.yml +- import_tasks: postgres_pgpool.yml when: psql_pgpool_install -- include: manage_pg_db.yml +- import_tasks: manage_pg_db.yml when: - psql_postgresql_install - psql_db_data is defined -- include: postgresql-backup.yml +- import_tasks: postgresql-backup.yml when: - psql_postgresql_install -- include: pgpool-ii.yml +- import_tasks: pgpool-ii.yml when: psql_pgpool_service_install -- include: postgresql-letsencrypt-acmetool.yml +- import_tasks: postgresql-letsencrypt-acmetool.yml when: - letsencrypt_acme_install is defined -- include: pgpool-letsencrypt-acmetool.yml +- import_tasks: pgpool-letsencrypt-acmetool.yml when: - letsencrypt_acme_install is defined diff --git a/redmine/tasks/main.yml b/redmine/tasks/main.yml index 5cf64b60..3a3a0027 100644 --- a/redmine/tasks/main.yml +++ b/redmine/tasks/main.yml @@ -1,14 +1,14 @@ --- -- include: base-packages-old-gems.yml +- import_tasks: base-packages-old-gems.yml when: is_precise -- include: base-packages.yml +- import_tasks: base-packages.yml when: is_trusty -- include: rubygems.yml -- include: redmine.yml -- include: redmine-plugins.yml -- include: base-config.yml -- include: mod_passenger.yml +- import_tasks: rubygems.yml +- import_tasks: redmine.yml +- import_tasks: redmine-plugins.yml +- import_tasks: base-config.yml +- import_tasks: mod_passenger.yml when: ruby_use_mod_passenger -- include: unicorn.yml +- import_tasks: unicorn.yml when: ruby_use_unicorn diff --git a/smartgears/smartgears_egi_image/tasks/main.yml b/smartgears/smartgears_egi_image/tasks/main.yml index fe7df81e..ccac38f8 100644 --- a/smartgears/smartgears_egi_image/tasks/main.yml +++ b/smartgears/smartgears_egi_image/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include: setup-egi-image.yml +- import_tasks: setup-egi-image.yml when: egi_image diff --git a/ssh-keys/tasks/main.yml b/ssh-keys/tasks/main.yml index 38f14fc4..13944c9d 100644 --- a/ssh-keys/tasks/main.yml +++ b/ssh-keys/tasks/main.yml @@ -1,8 +1,8 @@ --- -- include: root-ssh-keys.yml +- import_tasks: root-ssh-keys.yml when: - user_ssh_key is defined - manage_root_ssh_keys -- include: non-root-ssh-keys.yml +- import_tasks: non-root-ssh-keys.yml when: non_root_users diff --git a/tomcat-apache-requirements/tasks/main.yml b/tomcat-apache-requirements/tasks/main.yml index 16ca11ed..c6add52e 100644 --- a/tomcat-apache-requirements/tasks/main.yml +++ b/tomcat-apache-requirements/tasks/main.yml @@ -1,3 +1,3 @@ --- -- include: packages.yml -- include: java-requirements.yml +- import_tasks: packages.yml +- import_tasks: java-requirements.yml