Skip to content

Commit

Permalink
Merge pull request #101 from salsadigitalauorg/feature/DEVOPS-623_fix…
Browse files Browse the repository at this point in the history
…-token-plugin

[DEVOPS-623] Renamed token plugin to fetch_token.
  • Loading branch information
steveworley authored Dec 3, 2024
2 parents c4bf3b8 + 446fbe1 commit 86f0652
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion api/playbooks/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Trigger staggered deployment.
lagoon.api.deploy:
Expand Down
2 changes: 1 addition & 1 deletion api/playbooks/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Retrieve all environments.
set_fact:
Expand Down
2 changes: 1 addition & 1 deletion api/playbooks/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Retrieve all projects.
set_fact:
Expand Down
2 changes: 1 addition & 1 deletion api/playbooks/project_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Retrieve project metadata.
debug: msg="{{ lookup('lagoon.api.metadata', project=project_name) }}"
2 changes: 1 addition & 1 deletion api/playbooks/query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Query specific fields for all projects.
lagoon.api.query:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

DOCUMENTATION = r'''
module: token
module: fetch_token
description: Fetches a Lagoon token using ssh
short_description: Fetches a Lagoon token using ssh
options:
Expand All @@ -15,7 +15,7 @@

EXAMPLES = r'''
- name: Fetch a Lagoon token.
lagoon.api.token:
lagoon.api.fetch_token:
ssh_options: "-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
register: token
vars:
Expand Down
6 changes: 3 additions & 3 deletions api/roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following play can be used to fetch a token:
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token
```
The token will now be available in the `lagoon_api_token` localhost variable. Default Lagoon variables are also exported from the `lagoon.api.common` role.
Expand Down Expand Up @@ -46,7 +46,7 @@ To reuse the token in another play, the following can be done:
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token
- name: Retrieve all projects.
set_fact:
Expand All @@ -64,7 +64,7 @@ To reuse the token in another play, the following can be done:
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token
- name: Retrieve project by name.
set_fact:
Expand Down
2 changes: 1 addition & 1 deletion api/roles/token/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Fetch a Lagoon token.

- name: Fetch token.
lagoon.api.token:
lagoon.api.fetch_token:
ssh_options: "-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
register: fetched_token
when: lagoon_api_token is not defined
Expand Down
2 changes: 1 addition & 1 deletion api/tests/playbooks/environment_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Fetch environment vars.
lagoon.api.variables:
Expand Down
2 changes: 1 addition & 1 deletion api/tests/playbooks/lookup_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: lookup a project's variables
debug: msg="{{ item }}"
Expand Down
2 changes: 1 addition & 1 deletion api/tests/playbooks/project_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- lagoon.api.common
tasks:
- include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Fetch project vars.
lagoon.api.variables:
Expand Down
2 changes: 1 addition & 1 deletion api/tests/playbooks/task_definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
tasks:
- name: Create a token.
ansible.builtin.include_role:
name: lagoon.api.token
name: lagoon.api.fetch_token

- name: Ensure task definitions exist
lagoon.api.task_definition:
Expand Down

0 comments on commit 86f0652

Please sign in to comment.