Skip to content

Commit

Permalink
Replace include by include_tasks/import_tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj committed Dec 29, 2023
1 parent 1575396 commit 204e027
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 29 deletions.
2 changes: 1 addition & 1 deletion roles/comcommaker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- libapache2-mod-wsgi-py3


- include: ../../../shared/project-account.yml
- include_tasks: ../../../shared/project-account.yml
vars:
user: "{{ comcommaker_user }}"

Expand Down
4 changes: 3 additions & 1 deletion roles/drupal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
- postgresql-9.4
- python-psycopg2

- include: ../../../shared/project-account.yml user=www
- include_tasks: ../../../shared/project-account.yml
vars:
user: www

- name: init database
postgresql_db: name=osm_fr encoding='UTF-8' lc_collate='en_US.UTF-8' lc_ctype='en_US.UTF-8' template='template0'
Expand Down
4 changes: 3 additions & 1 deletion roles/export-cadastre/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
- zlib1g-dev
- libjpeg-dev

- include: ../../../shared/project-account.yml user=cadastre
- include_tasks: ../../../shared/project-account.yml
vars:
user: cadastre

- name: add cadastre user to www-data group
user: name="cadastre" groups="www-data" append=yes
Expand Down
4 changes: 3 additions & 1 deletion roles/geoosm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
- name: ensure postgresql server is running
service: name=postgresql state=started

- include: ../../../shared/project-account.yml user=geoosm
- include_tasks: ../../../shared/project-account.yml
vars:
user: geoosm

- name: checkout git repository for backend
git:
Expand Down
5 changes: 4 additions & 1 deletion roles/layers.openstreetmap.fr/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- include: ../../../shared/project-account.yml user=layers.openstreetmap.fr
- include_tasks: ../../../shared/project-account.yml
vars:
user: layers.openstreetmap.fr

- name: install packages
apt: pkg={{ item }}
with_items:
Expand Down
5 changes: 4 additions & 1 deletion roles/letsencrypt/tasks/acme-tiny.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- include: ../../../shared/project-account.yml user=letsencrypt generate_ssh_key=yes
- include_tasks: ../../../shared/project-account.yml
vars:
user: letsencrypt
generate_ssh_key: yes

- name: fetch generated public ssh key
fetch: src=/data/project/letsencrypt/.ssh/id_rsa.pub dest=public_keys/letsencrypt-{{ inventory_hostname }} flat=yes
Expand Down
5 changes: 4 additions & 1 deletion roles/letsencrypt/tasks/certbot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- include: ../../../shared/project-account.yml user=letsencrypt generate_ssh_key=yes
- include_tasks: ../../../shared/project-account.yml
vars:
user: letsencrypt
generate_ssh_key: yes

- name: fetch generated public ssh key
fetch: src=/data/project/letsencrypt/.ssh/id_rsa.pub dest=public_keys/letsencrypt-{{ inventory_hostname }} flat=yes
Expand Down
4 changes: 2 additions & 2 deletions roles/letsencrypt/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: run acme-tiny
include: acme-tiny.yml
include_tasks: acme-tiny.yml
when: letsencrypt_certbot is not defined

- name: run certbot
include: certbot.yml
include_tasks: certbot.yml
when: letsencrypt_certbot is defined
4 changes: 3 additions & 1 deletion roles/live/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- python3-iso8601
- sqlite3

- include: ../../../shared/project-account.yml user=live
- include_tasks: ../../../shared/project-account.yml
vars:
user: live

- name: add sudoers to access live user
copy: src=sudoers dest=/etc/sudoers.d/live mode=0440 owner=root group=root validate='visudo -cf %s'
Expand Down
4 changes: 3 additions & 1 deletion roles/nextcloud/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
- php-xml
- php-zip

- include: ../../../shared/project-account.yml user=nextcloud
- include_tasks: ../../../shared/project-account.yml
vars:
user: nextcloud


# install phpBB3 manually in /data/project/nextcloud/nextcloud/
Expand Down
4 changes: 3 additions & 1 deletion roles/osmbin/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
with_items:
- osmium-2.15.2-or-later_1.0_all.deb

- include: ../../../shared/project-account.yml user=osmbin
- include_tasks: ../../../shared/project-account.yml
vars:
user: osmbin

- name: add sudoers to access osmbin user
copy: src=sudoers dest=/etc/sudoers.d/osmbin mode=0440 owner=root group=root validate='visudo -cf %s'
Expand Down
4 changes: 3 additions & 1 deletion roles/osmose-frontend/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
- name: ensure postgresql server is running
service: name=postgresql state=started

- include: ../../../shared/project-account.yml user=osmose
- include_tasks: ../../../shared/project-account.yml
vars:
user: osmose

- name: init /data/work/osmose/results/
file: path=/data/work/osmose/results/ state=directory owner=osmose group=osmose
Expand Down
9 changes: 7 additions & 2 deletions roles/osmosis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
- name: ensure postgresql server is running
service: name=postgresql state=started

- include: ../../../shared/project-account.yml user=osmosis
- include_tasks: ../../../shared/project-account.yml
vars:
user: osmosis

- name: add sudoers to access osmosis user
copy: src=sudoers dest=/etc/sudoers.d/osmosis-backend mode=0440 owner=root group=root validate='visudo -cf %s'
Expand Down Expand Up @@ -97,7 +99,10 @@
become: yes
become_user: osmosis

- include: ../../../shared/osmosis.yml user=osmosis version=0.47
- include_tasks: ../../../shared/osmosis.yml
vars:
user: osmosis
version: 0.47

# To finish installation, run:
# - (cd /data/work/osmosis/ && wget http://download.openstreetmap.fr/extracts/europe/france.osm.pbf)
Expand Down
17 changes: 10 additions & 7 deletions roles/overpass-api/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
- "ansible_version.full | version_compare('2.3', '>=')"
msg: "ansible version must be >= 2.3, please update ansible."

- include: ../../../shared/project-account.yml user="{{ overpass_user }}" user_system="yes"
- include_tasks: ../../../shared/project-account.yml
vars:
user: "{{ overpass_user }}"
user_system: "yes"


- name: set overpass_database_dir
Expand All @@ -25,9 +28,9 @@
- "{{ overpass_database_dir }}"
- "{{ overpass_webroot_dir }}"

- include: compile.yml
- include: set_up_database.yml
- include: services.yml
- include: web.yml
- include: munin.yml
- include: restart.yml
- import_tasks: compile.yml
- import_tasks: set_up_database.yml
- import_tasks: services.yml
- import_tasks: web.yml
- import_tasks: munin.yml
- import_tasks: restart.yml
4 changes: 3 additions & 1 deletion roles/polygons/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
- name: ensure postgresql server is running
service: name=postgresql state=started

- include: ../../../shared/project-account.yml user=polygons
- include_tasks: ../../../shared/project-account.yml
vars:
user: polygons

- name: add sudoers to access polygons user
copy: src=sudoers dest=/etc/sudoers.d/polygons mode=0440 owner=root group=root validate='visudo -cf %s'
Expand Down
4 changes: 3 additions & 1 deletion roles/rawedit/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
- name: ensure postgresql server is running
service: name=postgresql state=started

- include: ../../../shared/project-account.yml user=rawedit
- include_tasks: ../../../shared/project-account.yml
vars:
user: rawedit


- name: init database
Expand Down
4 changes: 3 additions & 1 deletion roles/renderd/tasks/cyclosm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# style cyclosm
- include: ../../../shared/project-account.yml user=cyclosm
- include_tasks: ../../../shared/project-account.yml
vars:
user: cyclosm

- name: checkout git repository
git:
Expand Down
8 changes: 6 additions & 2 deletions roles/renderd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
- libapache2-mod-tile

# style OSM-FR style
- include: ../../../shared/project-account.yml user=osmfr-cartocss
- include_tasks: ../../../shared/project-account.yml
vars:
user: osmfr-cartocss
when: renderd_osmfr

- name: checkout git repository
Expand All @@ -53,7 +55,9 @@

# style layers
# TODO: recompilation de renderd avec XMLCONFIGS_MAX=64
- include: ../../../shared/project-account.yml user=layers
- include_tasks: ../../../shared/project-account.yml
vars:
user: layers
when: renderd_layers

- name: checkout git repository
Expand Down
4 changes: 3 additions & 1 deletion roles/taginfo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
- osmctools


- include: ../../../shared/project-account.yml user=taginfo
- include_tasks: ../../../shared/project-account.yml
vars:
user: taginfo

- name: init /data/work/taginfo paths
file: path={{ item }} state=directory owner=taginfo group=taginfo
Expand Down
4 changes: 3 additions & 1 deletion roles/yeswiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
- php7.0-zip
- python-pymysql

- include: ../../../shared/project-account.yml user=yeswiki
- include_tasks: ../../../shared/project-account.yml
vars:
user: yeswiki


# install yeswiki manually in /data/project/yeswiki/yeswiki/
Expand Down

0 comments on commit 204e027

Please sign in to comment.