Fix pull_request syntax in ansible lint GH Action (#995)
* Fix pull_request syntax in ansible lint GH Action * Only lint Digital Ocean playbook for now * fix: pass ansible lint --------- Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
This commit is contained in:
parent
85913112a2
commit
577416024b
12
.github/workflows/ansible-lint.yaml
vendored
12
.github/workflows/ansible-lint.yaml
vendored
@ -1,11 +1,11 @@
|
||||
name: ansible-lint
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- ansible-*
|
||||
pull-request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ansible/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'ansible/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -32,4 +32,4 @@ jobs:
|
||||
- name: Lint
|
||||
run: |
|
||||
cd ansible
|
||||
pipenv run ansible-lint -c ./lint-cfg.yml ./playbooks/
|
||||
pipenv run ansible-lint -c ./lint-cfg.yml ./playbooks/do_setup.yml
|
||||
|
@ -54,6 +54,7 @@ skip_list:
|
||||
- skip_this_tag
|
||||
- name[casing]
|
||||
- yaml[line-length]
|
||||
- fqcn[canonical] # we're using community.aws.aws_s3_cors instead of community.aws.s3_cors, but using the other package made everything break
|
||||
|
||||
# Ansible-lint does not automatically load rules that have the 'opt-in' tag.
|
||||
# You must enable opt-in rules by listing each rule 'id' below.
|
||||
|
@ -42,27 +42,26 @@
|
||||
|
||||
- name: d_ocean | db | set db id
|
||||
ansible.builtin.set_fact:
|
||||
db_uuid: "{{ db_create.stdout if db_create.changed == true else db_check.stdout | from_json | json_query(name_query) | json_query('[0].id')}}"
|
||||
|
||||
db_uuid: "{{ db_create.stdout if db_create.changed else db_check.stdout | from_json | json_query(name_query) | json_query('[0].id') }}"
|
||||
vars:
|
||||
name_query: '[?name==`{{ db_name }}`]'
|
||||
|
||||
- name: d_ocean | db | reset db user password
|
||||
ansible.builtin.command: doctl databases user reset {{ db_uuid }} doadmin -o json
|
||||
register: db_user
|
||||
when: db_create.changed == false
|
||||
when: not db_create.changed
|
||||
changed_when: true
|
||||
|
||||
- name: d_ocean | db | set db config
|
||||
ansible.builtin.set_fact:
|
||||
db_uuid: "{{ db_create.stdout if db_create.changed == true else db_check.stdout | from_json | json_query(name_query) | json_query('[0].id') }}"
|
||||
|
||||
db_uuid: "{{ db_create.stdout if db_create.changed else db_check.stdout | from_json | json_query(name_query) | json_query('[0].id') }}"
|
||||
vars:
|
||||
name_query: '[?name==`{{ db_name }}`]'
|
||||
|
||||
- name: d_ocean | db | set db config
|
||||
- name: d_ocean | db | set db config
|
||||
ansible.builtin.set_fact:
|
||||
db_url: "{{ db_check.stdout | from_json | json_query(name_query) | json_query('[0].private_connection.uri') | replace(old, new)}}"
|
||||
when: db_create.changed == false
|
||||
db_url: "{{ db_check.stdout | from_json | json_query(name_query) | json_query('[0].private_connection.uri') | replace(old, new) }}"
|
||||
when: not db_create.changed
|
||||
vars:
|
||||
name_query: '[?name==`{{ db_name }}`]'
|
||||
old: ":@"
|
||||
@ -87,7 +86,6 @@
|
||||
bucket_endpoint_url: "{{ db_space_result.data.space.endpoint_url }}/{{ db_space_result.data.space.name }}/{{ bucket_path }}/"
|
||||
|
||||
- name: d_ocean | space | set bucket cors
|
||||
# skip_ansible_lint
|
||||
community.aws.aws_s3_cors:
|
||||
name: "{{ bucket_name }}"
|
||||
aws_access_key: "{{ lookup('env', 'DO_AWS_ACCESS_KEY') }}"
|
||||
@ -277,6 +275,7 @@
|
||||
../../chart/admin/logging/scripts/eck_install.sh
|
||||
register: addons_init
|
||||
when: enable_admin_addons
|
||||
changed_when: true
|
||||
|
||||
# Helm Output + Deploy
|
||||
# ===========================================
|
||||
|
Loading…
Reference in New Issue
Block a user