Skip to content

Commit b3a400c

Browse files
authored
Merge pull request #143 from coopdevs/fix-ansible-linter
FIX: Ansible linter
2 parents eda744c + c497940 commit b3a400c

File tree

12 files changed

+33
-32
lines changed

12 files changed

+33
-32
lines changed

.yamllint.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ rules:
1212
document-start: disable
1313
empty-lines: {max: 3, level: error}
1414
hyphens: {level: error}
15-
indentation: disable
15+
indentation: enable
1616
key-duplicates: enable
1717
line-length: disable
18-
new-line-at-end-of-file: disable
18+
new-line-at-end-of-file: enable
1919
new-lines: {type: unix}
20-
trailing-spaces: disable
21-
truthy: disable
20+
trailing-spaces: enable
21+
truthy: enable

defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ odoo_role_odoo_db_admin_password: iT0ohDuoth6ONgahDeepaich0aeka5ul
4545
# Give the chance to select a database before login not filtered out by dbfilter, and enable db manager web interface.
4646
# In multi db mode, this is only relevant to db manager, as we force list_db to avoid an unaccessible website when dbfilter is disabled.
4747
# In single db mode,we disable dbfilter and respect list_db.
48-
odoo_role_list_db: False
48+
odoo_role_list_db: false
4949
# Security option that disables the web-base database manager and filters available DBs to list before login.
5050
# We ignore this setting in single DB mode to allow simpler db names such as "odoo" instead of domain name.
51-
odoo_role_dbfilter_enabled: True
51+
odoo_role_dbfilter_enabled: true
5252

5353
# Comma-separated list of modules to install before running the server
5454
odoo_role_odoo_core_modules: "base"

meta/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ galaxy_info:
88
min_ansible_version: 1.2
99

1010
platforms:
11-
- name: Ubuntu
12-
versions:
13-
- xenial
14-
- bionic
15-
- focal
11+
- name: Ubuntu
12+
versions:
13+
- xenial
14+
- bionic
15+
- focal
1616

1717
galaxy_tags:
1818
- odoo

tasks/add-service.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
become: true
1313
systemd:
1414
name: "{{ odoo_daemon }}"
15-
enabled: yes
15+
enabled: true
1616
state: started
17-
daemon_reload: yes
17+
daemon_reload: true
1818
notify: restart odoo

tasks/community-modules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Using the output of pip, detect which packages have been installed,
2020
# both fresh or upgraded. Save the list with a register so that we can
2121
# feed better odoo with it.
22-
22+
2323
- name: Detect upgraded packages
2424
args:
2525
# Example input (delete '# ' from each line below)
@@ -41,7 +41,7 @@
4141
# About sed:
4242
# - option `-r` switches to standard perl regexp, instead of GNU ones. Similar to `egrep` or `grep -E`
4343
# - option `-n` combined with flag `/p` prints "nothing" except the result of the script. Therefore, unmatching lines are hidden, and matching lines are shown after processed.
44-
# - capturing groups `(something)` can be referenced inside the matching part or at the replacing part with \1, \2, in order of appearence.
44+
# - capturing groups `(something)` can be referenced inside the matching part or at the replacing part with \1, \2, in order of appearence.
4545
shell: >
4646
grep 'Successfully installed' |
4747
sed -r 's/ /\n/g' |

tasks/create-user.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
- name: Create "{{ odoo_role_odoo_group }}" group
3-
become: yes
3+
become: true
44
group:
55
name: "{{ odoo_role_odoo_group }}"
66
state: present
77

88
- name: Create "{{ odoo_role_odoo_user }}" user
9-
become: yes
9+
become: true
1010
user:
1111
name: "{{ odoo_role_odoo_user }}"
1212
groups: "{{ odoo_role_odoo_group }}"
1313
group: "{{ odoo_role_odoo_group }}"
14-
append: yes
14+
append: true
1515
state: present
1616
shell: /bin/bash
1717

1818
- name: "Create sudoers config for {{ odoo_role_odoo_user }} user"
19-
become: yes
19+
become: true
2020
template:
2121
dest: "/etc/sudoers.d/{{ odoo_role_odoo_user }}"
2222
mode: 0440

tasks/download.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
unarchive:
4747
src: "{{ odoo_role_odoo_download_path }}"
4848
dest: "{{ odoo_role_odoo_path }}"
49-
remote_src: yes
49+
remote_src: true
5050
owner: "{{ odoo_role_odoo_user }}"
5151
group: "{{ odoo_role_odoo_group }}"
5252
mode: 0775
@@ -58,13 +58,13 @@
5858

5959
# Odoo from the OCA/OCB repository: https://github.com/OCA/OCB
6060
- name: "Git clone git reference {{ odoo_role_odoo_git_ref }}"
61-
become: yes
61+
become: true
6262
become_user: "{{ odoo_role_odoo_user }}"
6363
git:
6464
repo: "{{ odoo_role_odoo_git_url }}"
6565
dest: "{{ odoo_role_odoo_path }}"
6666
version: "{{ odoo_role_odoo_git_ref }}"
6767
depth: 1
68-
force: yes
68+
force: true
6969
register: odoo_role_desired_git_download
7070
when: odoo_role_download_strategy == "git"

tasks/logrotate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
path: "/etc/logrotate.d/{{ item.path }}"
44
block: "{{ item.conf }}"
55
create: true
6+
mode: 0644
67
loop: "{{ odoo_role_logrotate_odoo }}"

tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- name: Install system packages
55
become: true
66
apt:
7-
update_cache: yes
7+
update_cache: true
88
pkg:
99
- build-essential
1010
- python3-dev
@@ -22,7 +22,7 @@
2222
- name: Install libjpeg-dev
2323
become: true
2424
apt:
25-
update_cache: yes
25+
update_cache: true
2626
pkg:
2727
- libjpeg-dev
2828
state: present
@@ -34,7 +34,7 @@
3434
executable: /bin/bash
3535
register: wkhtmltox_installed
3636
failed_when: false
37-
changed_when: no
37+
changed_when: false
3838

3939
- name: Download and install wkhtmltopdf only if not already present at any version
4040
apt:
@@ -107,7 +107,7 @@
107107
npm:
108108
name: less
109109
version: 2.7.2
110-
global: yes
110+
global: true
111111
when: odoo_role_odoo_version < "12.0"
112112

113113
# This link is needed in Ubuntu 16.04 and in Ubuntu 18.04 raise an error.

tasks/pyenv.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Ensure apt cache is up to date
33
become: true
44
apt:
5-
update_cache: yes
5+
update_cache: true
66
cache_valid_time: "{{ 48 * 60 * 60 }}" # consider the cache to be valid within 48 hours
77

88
- name: Install development packages necessary for building Python
@@ -34,23 +34,23 @@
3434
git:
3535
repo: https://github.com/pyenv/pyenv.git
3636
dest: "/home/{{ odoo_role_odoo_user }}/pyenv"
37-
update: no
37+
update: false
3838

3939
- name: Install PyEnv-virtualenv plugin
4040
become: true
4141
become_user: "{{ odoo_role_odoo_user }}"
4242
git:
4343
repo: https://github.com/yyuu/pyenv-virtualenv.git
4444
dest: "/home/{{ odoo_role_odoo_user }}/pyenv/plugins/pyenv-virtualenv"
45-
update: no
45+
update: false
4646

4747
- name: Install PyEnv-update plugin
4848
become: true
4949
become_user: "{{ odoo_role_odoo_user }}"
5050
git:
5151
repo: https://github.com/pyenv/pyenv-update.git
5252
dest: "/home/{{ odoo_role_odoo_user }}/pyenv/plugins/pyenv-update"
53-
update: no
53+
update: false
5454

5555
- name: Install .pyenvrc
5656
become: true

0 commit comments

Comments
 (0)