mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
Configure yamllint to be compatible with ansible-lint
Current version of ansible-list pre-commit hook required changes in the ansible-freeipa yamllint configuration and these changes triggered issues in the current playbooks on roles and tests. This patch adds the required changes to yaml lint configuration and fixes the affected playbooks. Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
@@ -20,4 +20,9 @@ rules:
|
|||||||
max: 160
|
max: 160
|
||||||
# Disabled rules
|
# Disabled rules
|
||||||
indentation: disable
|
indentation: disable
|
||||||
comments: disable
|
comments:
|
||||||
|
min-spaces-from-content: 1
|
||||||
|
comments-indentation: disable
|
||||||
|
octal-values:
|
||||||
|
forbid-implicit-octal: true
|
||||||
|
forbid-explicit-octal: true
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
dest: "{{ ansible_facts['env'].HOME }}/password.txt"
|
dest: "{{ ansible_facts['env'].HOME }}/password.txt"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
mode: 0600
|
mode: "0600"
|
||||||
- name: Ensure symmetric vault exists with password from file.
|
- name: Ensure symmetric vault exists with password from file.
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
dest: "{{ ansible_facts['env'].HOME }}/public.pem"
|
dest: "{{ ansible_facts['env'].HOME }}/public.pem"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
mode: 0600
|
mode: "0600"
|
||||||
- name: Ensure asymmetric vault exists with public key from file.
|
- name: Ensure asymmetric vault exists with public key from file.
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ ipaadmin_keytab }}"
|
src: "{{ ipaadmin_keytab }}"
|
||||||
dest: "{{ keytab_temp.path }}"
|
dest: "{{ keytab_temp.path }}"
|
||||||
mode: 0600
|
mode: "0600"
|
||||||
delegate_to: "{{ result_ipaclient_test.servers[0] }}"
|
delegate_to: "{{ result_ipaclient_test.servers[0] }}"
|
||||||
when: ipaadmin_keytab is defined
|
when: ipaadmin_keytab is defined
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,3 @@
|
|||||||
ipaclient_configure_dns_resolver:
|
ipaclient_configure_dns_resolver:
|
||||||
state: absent
|
state: absent
|
||||||
when: ipaclient_cleanup_dns_resolver | bool
|
when: ipaclient_cleanup_dns_resolver | bool
|
||||||
|
|
||||||
#- name: Remove IPA client package
|
|
||||||
# ansible.builtin.package:
|
|
||||||
# name: "{{ ipaclient_packages }}"
|
|
||||||
# state: absent
|
|
||||||
|
|||||||
@@ -2,4 +2,3 @@
|
|||||||
# vars/RedHat-7
|
# vars/RedHat-7
|
||||||
---
|
---
|
||||||
ipaclient_packages: [ "ipa-client", "libselinux-python" ]
|
ipaclient_packages: [ "ipa-client", "libselinux-python" ]
|
||||||
#ansible_python_interpreter: '/usr/bin/python2'
|
|
||||||
|
|||||||
@@ -2,4 +2,3 @@
|
|||||||
# vars/default.yml
|
# vars/default.yml
|
||||||
---
|
---
|
||||||
ipaclient_packages: [ "ipa-client", "python3-libselinux" ]
|
ipaclient_packages: [ "ipa-client", "python3-libselinux" ]
|
||||||
#ansible_python_interpreter: '/usr/bin/python3'
|
|
||||||
|
|||||||
@@ -54,8 +54,3 @@
|
|||||||
# 1 means that uninstall failed because IPA server was not configured
|
# 1 means that uninstall failed because IPA server was not configured
|
||||||
failed_when: uninstall.rc != 0 and uninstall.rc != 1
|
failed_when: uninstall.rc != 0 and uninstall.rc != 1
|
||||||
changed_when: uninstall.rc == 0
|
changed_when: uninstall.rc == 0
|
||||||
|
|
||||||
#- name: Remove IPA server packages
|
|
||||||
# ansible.builtin.package:
|
|
||||||
# name: "{{ ipaserver_packages }}"
|
|
||||||
# state: absent
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/sssd/pki
|
path: /etc/sssd/pki
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0711
|
mode: "0711"
|
||||||
|
|
||||||
- name: Ensure /etc/sssd/pki/sssd_auth_ca_db.pem is absent
|
- name: Ensure /etc/sssd/pki/sssd_auth_ca_db.pem is absent
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -201,7 +201,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/sssd/pki
|
path: /etc/sssd/pki
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0711
|
mode: "0711"
|
||||||
|
|
||||||
- name: Ensure /etc/sssd/pki/sssd_auth_ca_db.pem is absent
|
- name: Ensure /etc/sssd/pki/sssd_auth_ca_db.pem is absent
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/root/ca-less-test"
|
path: "/root/ca-less-test"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0775
|
mode: "0775"
|
||||||
|
|
||||||
- name: Copy CA certificate
|
- name: Copy CA certificate
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/root/ca-less-test"
|
path: "/root/ca-less-test"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0775
|
mode: "0775"
|
||||||
|
|
||||||
- name: Copy CA certificate
|
- name: Copy CA certificate
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "/root/host.csr"
|
dest: "/root/host.csr"
|
||||||
content: "{{ host_req.stdout }}"
|
content: "{{ host_req.stdout }}"
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
|
|
||||||
# TESTS
|
# TESTS
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "/root/user.csr"
|
dest: "/root/user.csr"
|
||||||
content: "{{ user_req.stdout }}"
|
content: "{{ user_req.stdout }}"
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
|
|
||||||
# TESTS
|
# TESTS
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ playbook_dir }}/{{ item }}"
|
src: "{{ playbook_dir }}/{{ item }}"
|
||||||
dest: "{{ ansible_facts['env'].HOME }}/{{ item }}"
|
dest: "{{ ansible_facts['env'].HOME }}/{{ item }}"
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
with_items:
|
with_items:
|
||||||
- A_private.pem
|
- A_private.pem
|
||||||
- A_public.pem
|
- A_public.pem
|
||||||
|
|||||||
Reference in New Issue
Block a user