Skip to content

Commit af902c5

Browse files
committed
ci(.travis.yml): update Ansible to 2.5.15
Additional changes have been made: 1) remove get_md5 parameter from stat module. From https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#noteworthy-module-changes % The stat and win_stat modules have changed the default of the option get_md5 from true to false. This option will be removed starting with Ansible version 2.9 % 2) rewrite the way we pass variables to roles. Use "vars" parameter for for that. Inspired by https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#fixed-handling-of-keywords-and-inline-variables 3) migrate "with_items" to "loop" as this is "the recommended way to perform loops". Details: https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#migrating-from-with-x-to-loop Changelogs: - https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst - https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html Part of #1142
1 parent effc1c1 commit af902c5

File tree

5 files changed

+19
-24
lines changed

5 files changed

+19
-24
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ before_script:
2626
mkdir -p /tmp/uploads /tmp/preview;
2727
cp src/main/resources/test/test.png /tmp/uploads/1.png;
2828
npm install -g bootlint;
29-
pip install --user html5validator robotframework-lint ansible==2.4.6.0 ansible-lint;
29+
pip install --user html5validator robotframework-lint ansible==2.5.15 ansible-lint;
3030
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
3131
gem install danger nokogiri --no-ri --no-rdoc;
3232
fi;

src/main/scripts/ci/ansible/deploy.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
stat:
1616
path: "{{ local_war_dir }}/mystamps.war"
1717
get_checksum: no
18-
get_md5: no
1918
register: war_file
2019
become: no
2120
delegate_to: 127.0.0.1

vagrant/provisioning/prod.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@
2626
roles:
2727
- php-coder.oraclejdk
2828
- mystamps-user
29-
- { role: mystamps-app, tags: app }
30-
- {
31-
role: php-coder.nginx,
32-
remove_default_vhost: yes,
29+
- role: mystamps-app
30+
tags: app
31+
- role: php-coder.nginx
32+
vars:
33+
remove_default_vhost: yes
3334
state: stopped
34-
}
35-
- { role: mystamps-nginx, tags: ssl }
36-
- {
37-
role: mystamps-backup,
38-
tags: backup,
39-
when: profile == 'prod'
40-
}
35+
- role: mystamps-nginx
36+
tags: ssl
37+
- role: mystamps-backup
38+
when: profile == 'prod'
39+
tags: backup

vagrant/provisioning/roles/mystamps-nginx/tasks/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
owner: root
2525
group: root
2626
mode: '0644'
27-
with_items:
27+
loop:
2828
- mystamps-http.conf
2929
- mystamps-ssl.conf
3030
- mystamps-static.conf
@@ -40,7 +40,7 @@
4040
owner: root
4141
group: root
4242
mode: '0644'
43-
with_items:
43+
loop:
4444
- 503.en.html
4545
- 503.ru.html
4646
notify:
@@ -60,7 +60,7 @@
6060
owner: root
6161
group: nginx
6262
mode: '0640'
63-
with_items:
63+
loop:
6464
- my-stamps.ru.key
6565
- my-stamps.ru.crt
6666
notify:

vagrant/provisioning/vagrant.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@
3232
- role: php-coder.oraclejdk
3333
- role: mystamps-user
3434
- role: mystamps-app
35-
- {
36-
role: php-coder.nginx,
37-
remove_default_vhost: yes,
35+
- role: php-coder.nginx
36+
vars:
37+
remove_default_vhost: yes
3838
state: stopped
39-
}
4039
- role: mystamps-nginx
41-
- {
42-
role: mystamps-backup,
43-
when: profile == 'prod'
44-
}
40+
- role: mystamps-backup
41+
when: profile == 'prod'

0 commit comments

Comments
 (0)