Skip to content

Commit

Permalink
Merge pull request #231 from StackStorm/fix/ansible-lint
Browse files Browse the repository at this point in the history
Fix ansible-lint CI failures
  • Loading branch information
armab authored Feb 19, 2019
2 parents 9827471 + 23a77af commit de82133
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

workflows:
version: 2
helm:
lint:
jobs:
- ansible-lint
- yaml-lint
Expand Down
1 change: 0 additions & 1 deletion roles/StackStorm.ewc/tasks/ewc_repos_apt.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Install prereqs (Debian)
become: yes
apt:
Expand Down
1 change: 0 additions & 1 deletion roles/StackStorm.ewc/tasks/ewc_repos_cleanup_apt.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Cleanup repo list file from disk
become: yes
file:
Expand Down
3 changes: 1 addition & 2 deletions roles/StackStorm.ewc/tasks/ewc_repos_cleanup_yum.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---

- name: Cleanup repo list file from disk
become: yes
yum_resository:
yum_repository:
name: "StackStorm_{{ ewc_repo }}"
state: absent
tags:
Expand Down
1 change: 0 additions & 1 deletion roles/StackStorm.ewc/tasks/ewc_repos_yum.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

# Fixes "Failure talking to yum: Cannot retrieve repository metadata (repomd.xml) for repository: StackStorm_stable. Please verify its path and try again" when installing st2
- name: Update ca-certificates package
become: yes
Expand Down
1 change: 0 additions & 1 deletion roles/StackStorm.ewc/tasks/ldap.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Setup st2.conf auth backend to LDAP
become: yes
# Unfortunately, ``with_dict`` also logs the dict which could leak passwords.
Expand Down
1 change: 0 additions & 1 deletion roles/StackStorm.ewc/tasks/license.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Check if EWC license hash file is present
stat:
path: /etc/packagecloud/ewc_license_hash.txt
Expand Down
108 changes: 54 additions & 54 deletions roles/StackStorm.ewc/tasks/rbac.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
---
- name: Copy default RBAC roles to /opt/stackstorm/rbac/roles directory
become: yes
template:
src: rbac_roles/roles.yml.j2
dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac_default_roles }}"
notify:
- reload ewc_rbac
- name: Copy default RBAC roles to /opt/stackstorm/rbac/roles directory
become: yes
template:
src: rbac_roles/roles.yml.j2
dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac_default_roles }}"
notify:
- reload ewc_rbac

- name: Copy user defined RBAC roles to /opt/stackstorm/rbac/roles directory
become: yes
template:
src: rbac_roles/roles.yml.j2
dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac.roles }}"
when: ewc_rbac.roles is defined
notify:
- reload ewc_rbac
- name: Copy user defined RBAC roles to /opt/stackstorm/rbac/roles directory
become: yes
template:
src: rbac_roles/roles.yml.j2
dest: /opt/stackstorm/rbac/roles/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac.roles }}"
when: ewc_rbac.roles is defined
notify:
- reload ewc_rbac

- name: Copy default RBAC assignments to /opt/stackstorm/rbac/assignments directory
become: yes
template:
src: rbac_assignments/assignments.yml.j2
dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac_default_assignments }}"
notify:
- reload ewc_rbac
- name: Copy default RBAC assignments to /opt/stackstorm/rbac/assignments directory
become: yes
template:
src: rbac_assignments/assignments.yml.j2
dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac_default_assignments }}"
notify:
- reload ewc_rbac

- name: Copy user defined RBAC assignments to /opt/stackstorm/rbac/assignments directory
become: yes
template:
src: rbac_assignments/assignments.yml.j2
dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac.assignments }}"
when: ewc_rbac.assignments is defined
notify:
- reload ewc_rbac
- name: Copy user defined RBAC assignments to /opt/stackstorm/rbac/assignments directory
become: yes
template:
src: rbac_assignments/assignments.yml.j2
dest: /opt/stackstorm/rbac/assignments/{{ item.name }}.yaml
owner: st2
group: st2
loop: "{{ ewc_rbac.assignments }}"
when: ewc_rbac.assignments is defined
notify:
- reload ewc_rbac

- name: Enable RBAC in st2 configuration
become: yes
ini_file:
dest: /etc/st2/st2.conf
section: rbac
option: enable
value: True
backup: yes
notify:
- restart st2
- reload ewc_rbac
- restart st2api
- name: Enable RBAC in st2 configuration
become: yes
ini_file:
dest: /etc/st2/st2.conf
section: rbac
option: enable
value: True
backup: yes
notify:
- restart st2
- reload ewc_rbac
- restart st2api
2 changes: 1 addition & 1 deletion roles/StackStorm.nginx/tasks/nginx_yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
setup:
filter: ansible_selinux
when: nginx_selinux_dependencies.changed
tags: nginx
tags: nginx, skip_ansible_lint

- name: Adjust SELinux to allow network access for nginx
become: yes
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.postgresql/tasks/postgresql_yum6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
become: yes
command: service postgresql-9.4 initdb
when: install_postgresql.changed
tags: [db, postgresql]
tags: [db, postgresql, skip_ansible_lint]

- name: yum | MD5-encrypted password for PostgreSQL 1
become: yes
Expand Down
2 changes: 1 addition & 1 deletion roles/StackStorm.postgresql/tasks/postgresql_yum7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
become: yes
command: postgresql-setup initdb
when: install_postgresql.changed
tags: [db, postgresql]
tags: [db, postgresql, skip_ansible_lint]

- name: yum | MD5-encrypted password for PostgreSQL 1
become: yes
Expand Down
3 changes: 2 additions & 1 deletion roles/StackStorm.st2smoketests/tasks/st2chatops.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
- name: Verify st2chatops using bin/hubot
# when editing, make sure it works for at least 2 adapters: 'shell' and 'slack'
shell: timeout 10 bash -c '(sleep 5; echo exit ) | bin/hubot'
shell: set -o pipefail && timeout 10 bash -c '(sleep 5; echo exit ) | bin/hubot'
args:
chdir: /opt/stackstorm/chatops/
executable: /bin/bash
environment:
HUBOT_LOG_LEVEL: debug
register: hubot_output
Expand Down

0 comments on commit de82133

Please sign in to comment.