Skip to content

Commit

Permalink
fix some lint offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 20, 2023
1 parent 58dc0ce commit 0ae46cd
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 25 deletions.
2 changes: 1 addition & 1 deletion roles/custom_certificates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
args:
creates: "{{ custom_certificates_ca_directory_certs }}/{{ custom_certificates_server }}.crt"

- include: issue.yml
- include_tasks: issue.yml
when: custom_certificates_hostnames is defined
with_items: "{{ custom_certificates_hostnames }}"
loop_control:
Expand Down
9 changes: 7 additions & 2 deletions roles/dynflow_devel/tasks/dynflow_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
state: present

- name: 'Install bundler'
gem: name=bundler state=present
gem:
name: bundler
state: present

- name: 'Install gems'
bundler: chdir=~/dynflow state=present executable=~/bin/bundle
bundler:
chdir: '~/dynflow'
state: present
executable: '~/bin/bundle'
1 change: 1 addition & 0 deletions roles/foreman/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
dependencies:
- role: umask
- role: selinux
- role: fapolicyd
- role: etc_hosts
- role: koji
- role: packit
Expand Down
2 changes: 1 addition & 1 deletion roles/foreman_provisioning_infrastructure/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
register: foreman_provisioning_compute_profile_cmd
ignore_errors: True

- include: compute_profiles.yml
- include_tasks: compute_profiles.yml
when: "'Error' not in foreman_provisioning_compute_profile_cmd.stderr"

# Domain
Expand Down
7 changes: 5 additions & 2 deletions roles/foreman_proxy_content/tasks/devel_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
register: foreman_get

- name: 'Check for rails server'
fail: msg="No rails server detected running on {{ foreman_proxy_content_server }}"
fail:
msg: "No rails server detected running on {{ foreman_proxy_content_server }}"
when: foreman_get.status != 200

- name: 'Add group foreman'
group: name=foreman state=present
group:
name: foreman
state: present
delegate_to: "{{ foreman_proxy_content_server }}"
4 changes: 3 additions & 1 deletion roles/foreman_proxy_content/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
- include_tasks: certs_generate.yml

- name: 'Change cert permissions'
file: path='/etc/pki/katello/private' mode=0775
file:
path: '/etc/pki/katello/private'
mode: 0775
delegate_to: "{{ foreman_proxy_content_server }}"
when: devel is defined and devel

Expand Down
3 changes: 2 additions & 1 deletion roles/forklift_versions/tasks/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
become: no

- name: set individual component vars
set_fact: "{{ item.key }}={{ item.value }}"
set_fact:
"{{ item.key }}": "{{ item.value }}"
with_items: "{{ forklift_versions.versions | dict2items }}"
4 changes: 3 additions & 1 deletion roles/git/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- name: 'Install git'
become: true
yum: name=git-core state=present
yum:
name: git-core
state: present
16 changes: 12 additions & 4 deletions roles/hammer_devel/tasks/hammer_config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
- name: 'Add hammer config directory'
file: path=~/.hammer state=directory
file:
path: '~/.hammer'
state: directory

- name: 'Add hammer module config directory'
file: path=~/.hammer/cli.modules.d state=directory
file:
path: '~/.hammer/cli.modules.d'
state: directory

- name: 'Configure hammer'
command: cp ~/hammer-cli/config/cli_config.template.yml ~/.hammer/cli_config.yml
Expand Down Expand Up @@ -76,7 +80,11 @@
when: ('theforeman/hammer-cli-foreman-virt-who-configure' in hammer_devel_repositories)

- name: 'Alias hammer'
lineinfile: dest=~/.bash_profile line="alias hammer='BUNDLE_GEMFILE=~/hammer-cli-foreman/Gemfile bundle exec hammer'"
lineinfile:
dest: '~/.bash_profile'
line: "alias hammer='BUNDLE_GEMFILE=~/hammer-cli-foreman/Gemfile bundle exec hammer'"

- name: 'Alias rake'
lineinfile: dest=~/.bash_profile line="alias rake='bundle exec rake'"
lineinfile:
dest: '~/.bash_profile'
line: "alias rake='bundle exec rake'"
8 changes: 6 additions & 2 deletions roles/hammer_devel/tasks/hammer_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
- name: 'Install gem native dependencies'
become: true
yum: name=gcc-c++ state=present
yum:
name: gcc-c++
state: present

- name: 'Install gems'
bundler: chdir=~/hammer-cli-foreman state=present
bundler:
chdir: '~/hammer-cli-foreman'
state: present
4 changes: 3 additions & 1 deletion roles/libvirt/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
when: libvirt_nested

- name: 'restart libvirt'
service: name=libvirtd state=restarted
service:
name: libvirtd
state: restarted

- include_tasks: 'tftp.yml'
when: libvirt_tftp
34 changes: 27 additions & 7 deletions roles/libvirt/tasks/tftp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
# libvirt seems to have bug that it does not create the symlink even if the network was defined with auto provisioning
# so we ensure the symlink exists and network autostarts after reboot
- name: 'make provisioning network autostart on reboot'
file: state=link src=/etc/libvirt/qemu/networks/provision.xml path=/etc/libvirt/qemu/networks/autostart/provision.xml
file:
state: link
src: /etc/libvirt/qemu/networks/provision.xml
path: /etc/libvirt/qemu/networks/autostart/provision.xml

- name: 'create the provisioning storage'
virt_pool:
Expand All @@ -18,16 +21,27 @@

# Setup TFTP for libvirt
- name: 'create /var/lib/tftpboot'
file: path=/var/lib/tftpboot state=directory mode=0755
file:
path: /var/lib/tftpboot
state: directory
mode: '0755'

- name: 'create /var/lib/tftpboot/boot'
file: path=/var/lib/tftpboot/boot state=directory mode=0755
file:
path: /var/lib/tftpboot/boot
state: directory
mode: '0755'

- name: 'create /var/lib/tftpboot/pxelinux.cfg'
file: path=/var/lib/tftpboot/pxelinux.cfg state=directory mode=0755
file:
path: /var/lib/tftpboot/pxelinux.cfg
state: directory
mode: '0755'

- name: 'install syslinux for tftp directory'
yum: name=syslinux state=present
yum:
name: syslinux
state: present

- name: 'copy syslinux files to /var/lib/tftpboot'
shell: cp /usr/share/syslinux/{pxelinux.0,menu.c32,chain.c32} /var/lib/tftpboot
Expand All @@ -44,7 +58,13 @@
shell: set -o pipefail && find /var/lib/tftpboot/ -type d | xargs chmod g+s

- name: 'start the provision libvirt network'
virt_net: state=active name=provision autostart=yes
virt_net:
state: active
name: provision
autostart: yes

- name: 'start the provision libvirt storage pool'
virt_pool: state=active name=provision autostart=yes
virt_pool:
state: active
name: provision
autostart: yes
4 changes: 3 additions & 1 deletion roles/ruby_libvirt_gem/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
- name: 'Restart smart proxy'
service: name=foreman-proxy state=restarted
service:
name: foreman-proxy
state: restarted
4 changes: 3 additions & 1 deletion roles/ruby_libvirt_gem/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
- name: 'Install libvirt gem'
yum: name=rubygem-ruby-libvirt state=present
yum:
name: rubygem-ruby-libvirt
state: present
notify:
- 'Restart smart proxy'

0 comments on commit 0ae46cd

Please sign in to comment.