Skip to content

Commit

Permalink
Fix ansible-lint rule violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ansible-code-bot-stage[bot] committed Jun 11, 2024
1 parent 136b860 commit 0e031e4
Show file tree
Hide file tree
Showing 19 changed files with 46 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
skip_list:
- '303'
- "303"
2 changes: 1 addition & 1 deletion .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
skip_list:
- '303'
- "303"
- experimental
6 changes: 3 additions & 3 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
"MD013": false # line-length
"MD014": false # show commands output
"MD041": false # first line should be heading (build status image)
MD013: false # line-length
MD014: false # show commands output
MD041: false # first line should be heading (build status image)
1 change: 0 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ tags:
- landscape

dependencies: {}

repository: https://github.com/stdevel/ansible-collection-landscape
documentation: https://github.com/stdevel/ansible-collection-landscape/blob/main/README.md
homepage: https://github.com/stdevel/ansible-collection-landscape
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
requires_ansible: '>=2.9.10'
requires_ansible: ">=2.9.10"

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
Expand Down
6 changes: 3 additions & 3 deletions roles/client/.markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
"MD013": false # line-length
"MD014": false # show commands output
"MD041": false # first line should be heading (build status image)
MD013: false # line-length
MD014: false # show commands output
MD041: false # first line should be heading (build status image)
6 changes: 3 additions & 3 deletions roles/client/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
- name: Set hosts entry for local Landscape server
ansible.builtin.lineinfile:
path: /etc/hosts
line: '192.168.124.106 landscape-server-2310'
line: 192.168.124.106 landscape-server-2310

- name: Upload Landscape SSL certificate
ansible.builtin.copy:
src: landscape.pem
dest: /etc/landscape/landscape_server.pem
owner: root
group: root
mode: '0644'
mode: "0644"

roles:
- role: stdevel.landscape.client
client_landscape_server: 'landscape-server-2310'
client_landscape_server: landscape-server-2310
6 changes: 3 additions & 3 deletions roles/client/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ provisioner:
verifier:
name: testinfra
lint: |
yamllint .
ansible-lint
flake8
yamllint .
ansible-lint
flake8
18 changes: 9 additions & 9 deletions roles/client/tasks/facts.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
---
- name: Set SSL certificate (if set)
ansible.builtin.set_fact:
register_parameter_ssl: "--ssl-public-key {{ client_landscape_ssl }}"
register_parameter_ssl: --ssl-public-key {{ client_landscape_ssl }}
when: client_landscape_ssl is defined

- name: Set account name (if set)
ansible.builtin.set_fact:
register_parameter_tags: "--tags {{ client_tags }}"
register_parameter_tags: --tags {{ client_tags }}
when: client_tags is defined
- name: Set account name (if not set)
ansible.builtin.set_fact:
register_parameter_tags: ''
register_parameter_tags: ""
when: client_tags is undefined

- name: Set registration key (if set)
ansible.builtin.set_fact:
register_parameter_key: "--registration-key {{ client_registration_key }}"
register_parameter_key: --registration-key {{ client_registration_key }}
when: client_registration_key is defined
- name: Set registration key (if not set)
ansible.builtin.set_fact:
register_parameter_key: ''
register_parameter_key: ""
when: client_registration_key is undefined

- name: Set computer title (if set)
ansible.builtin.set_fact:
register_parameter_title: "--computer-title '{{ client_computer_title }}'"
register_parameter_title: --computer-title '{{ client_computer_title }}'
when: client_computer_title is defined
- name: Set computer title (if not set)
ansible.builtin.set_fact:
register_parameter_title: "--computer-title '{{ ansible_fqdn }}'"
register_parameter_title: --computer-title '{{ ansible_fqdn }}'
when: client_computer_title is undefined

- name: Set account name (if set)
ansible.builtin.set_fact:
register_parameter_account: "--account-name {{ client_account_name }}"
register_parameter_account: --account-name {{ client_account_name }}
when: client_account_name is defined
- name: Set account name (if not set)
ansible.builtin.set_fact:
register_parameter_account: ''
register_parameter_account: ""
when: client_account_name is undefined
3 changes: 2 additions & 1 deletion roles/client/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
ansible.builtin.include_tasks: facts.yml

- name: Register system
ansible.builtin.command: "landscape-config {{ register_parameter_ssl }} {{ register_parameter_tags }} {{ register_parameter_key }} {{ register_parameter_title }} {{ register_parameter_account }} --url https://{{ client_landscape_server }}/message-system --ping-url http://{{ client_landscape_server }}/ping --silent"
ansible.builtin.command: landscape-config {{ register_parameter_ssl }} {{ register_parameter_tags }} {{ register_parameter_key }} {{ register_parameter_title }}
{{ register_parameter_account }} --url https://{{ client_landscape_server }}/message-system --ping-url http://{{ client_landscape_server }}/ping --silent
args:
creates: /var/lib/landscape/client/manager.database
become: true
2 changes: 1 addition & 1 deletion roles/server/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
# package configuration
server_version: '24.04'
server_version: "24.04"
3 changes: 2 additions & 1 deletion roles/server/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
galaxy_info:
namespace: stdevel
role_name: server
author: Christian Stankowic
description: Installs Ubuntu Landscape
license: GPL-3.0-only

min_ansible_version: '2.9'
min_ansible_version: "2.9"

platforms:
- name: Ubuntu
Expand Down
4 changes: 2 additions & 2 deletions roles/server/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
hosts: landscape-server-2303
roles:
- role: server
server_version: '23.03'
server_version: "23.03"

- name: Converge
hosts: landscape-server-2404
roles:
- role: server
server_version: '24.04'
server_version: "24.04"
6 changes: 3 additions & 3 deletions roles/server/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ provisioner:
verifier:
name: testinfra
lint: |
yamllint .
ansible-lint
flake8
yamllint .
ansible-lint
flake8
4 changes: 2 additions & 2 deletions roles/server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
vars:
params:
files:
- '{{ server_version }}.yml'
- "{{ server_version }}.yml"
- main.yml
paths:
- 'vars'
- vars

- name: Include check tasks
ansible.builtin.include_tasks: check.yml
Expand Down
2 changes: 1 addition & 1 deletion roles/server/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
server_ppa: "ppa:landscape/self-hosted-{{ server_version }}"
server_ppa: ppa:landscape/self-hosted-{{ server_version }}
server_packages:
- landscape-server-quickstart
6 changes: 3 additions & 3 deletions roles/storage/.markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
"MD013": false # line-length
"MD014": false # show commands output
"MD041": false # first line should be heading (build status image)
MD013: false # line-length
MD014: false # show commands output
MD041: false # first line should be heading (build status image)
6 changes: 3 additions & 3 deletions roles/storage/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ provisioner:
verifier:
name: testinfra
lint: |
yamllint .
ansible-lint
flake8
yamllint .
ansible-lint
flake8
4 changes: 2 additions & 2 deletions roles/storage/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
- name: Create file systems # noqa: args[module]
community.general.filesystem:
fstype: "{{ item.type }}"
dev: "/dev/mapper/{{ storage_vg }}-{{ item.name }}"
dev: /dev/mapper/{{ storage_vg }}-{{ item.name }}
loop: "{{ storage_filesystems }}"
- name: Create mount points
ansible.posix.mount:
path: "{{ item.mountpoint }}"
src: "/dev/mapper/{{ storage_vg }}-{{ item.name }}"
src: /dev/mapper/{{ storage_vg }}-{{ item.name }}
fstype: "{{ item.type }}"
opts: auto
state: mounted
Expand Down

0 comments on commit 0e031e4

Please sign in to comment.