Browse Source

Use Jinja tests instead of Jinja filters

See https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.5.html#jinja-tests-used-as-filters
keep-around/ebbc799dfe311d0f1f0a0d0054b18176e2e4622c
Pierre-Louis Bonicoli 3 years ago
parent
commit
e34aa29b15
No known key found for this signature in database GPG Key ID: ADC2651DDACD3538
  1. 4
      molecule/enough/roles/nextcloud/tasks/nextcloud.yml
  2. 2
      molecule/forum/roles/discourse/tasks/main.yml
  3. 4
      molecule/gitlab/roles/gitlab-ci/tasks/gitlab-ci.yml
  4. 4
      molecule/icinga/roles/icinga2_client/tasks/main.yml
  5. 4
      molecule/infrastructure/roles/vm/tasks/main.yml
  6. 2
      molecule/weblate/roles/weblate/tasks/weblate.yml
  7. 2
      molecule/website/roles/website/tasks/website.yml

4
molecule/enough/roles/nextcloud/tasks/nextcloud.yml

@ -57,7 +57,7 @@
# 400 is because vhost_fqdn may not yet been set as a trusted domain
status_code: [ 400, 200 ]
register: nextcloud_get
until: nextcloud_get|succeeded
until: nextcloud_get is success
retries: 30
delay: 5
@ -213,7 +213,7 @@
url=$(cat /var/lib/tor/services/cloud/hostname)
torsocks curl --silent http://$url/login > /dev/null
register: tor_nextcloud_curl
until: tor_nextcloud_curl|succeeded
until: tor_nextcloud_curl is success
retries: 30
delay: 10

2
molecule/forum/roles/discourse/tasks/main.yml

@ -27,4 +27,4 @@
args:
chdir: "/srv/forum/{{ forum_name }}"
become: false
when: app_config|changed
when: app_config is changed

4
molecule/gitlab/roles/gitlab-ci/tasks/gitlab-ci.yml

@ -22,7 +22,7 @@
method: GET
status_code: 200
register: api_projects
until: api_projects|succeeded
until: api_projects is success
retries: 20
delay: 30
delegate_to: gitlab-host
@ -58,4 +58,4 @@
--docker-volumes $(which docker):/bin/docker \
{% if letsencrypt_nginx_staging | default(false) %}--tls-ca-file /etc/ssl/certs/fakeleintermediatex1.pem{% endif %} \
--docker-pull-policy if-not-present
when: result|failed
when: result is failed

4
molecule/icinga/roles/icinga2_client/tasks/main.yml

@ -65,7 +65,7 @@
args:
creates: /etc/icinga2/pki/trusted-master.crt
register: output
until: output|success
until: output is success
retries: 10
delay: 5
@ -98,7 +98,7 @@
--accept-config
changed_when: False
register: output
until: output|success
until: output is success
retries: 10
delay: 5

4
molecule/infrastructure/roles/vm/tasks/main.yml

@ -82,7 +82,7 @@
-i {{ ssh_private_keyfile }}
{% if hosts_orig is defined and item.openstack.name in hosts_orig.all.hosts and hosts_orig.all.hosts[item.openstack.name].ansible_user is defined %}{{ hosts_orig.all.hosts[item.openstack.name].ansible_user }}{% else %}debian{% endif %}@{{ item.openstack.public_v4 }} which python
register: result
until: result|success
until: result is success
retries: 30
delay: 10
with_items: "{{ server.results }}"
@ -95,7 +95,7 @@
-i {{ ssh_private_keyfile }}
{% if hosts_orig is defined and item.openstack.name in hosts_orig.all.hosts and hosts_orig.all.hosts[item.openstack.name].ansible_user is defined %}{{ hosts_orig.all.hosts[item.openstack.name].ansible_user }}{% else %}debian{% endif %}@{{ item.openstack.public_v4 }} grep -q 'Cloud-init.*finished' /var/log/cloud-init-output.log
register: result
until: result|success
until: result is success
retries: 30
delay: 10
with_items: "{{ server.results }}"

2
molecule/weblate/roles/weblate/tasks/weblate.yml

@ -43,5 +43,5 @@
- name: Activate crontab
shell: crontab /srv/crontab
when: crontab|changed
when: crontab is changed
become: False

2
molecule/website/roles/website/tasks/website.yml

@ -80,5 +80,5 @@
- name: Activate crontab
shell: crontab /srv/crontab
when: crontab|changed
when: crontab is changed
become: False
Loading…
Cancel
Save