Reset 2FA from user bob in demo1 #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reset 2FA | |
| run-name: Reset 2FA from user ${{ inputs.user }} in ${{ inputs.environment }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| user: | |
| description: User to remove 2FA from | |
| type: string | |
| required: true | |
| environment: | |
| type: choice | |
| description: Infrastructure to provision | |
| default: | |
| required: true | |
| options: | |
| - "demo1" | |
| jobs: | |
| reset: | |
| environment: ${{ inputs.environment }} | |
| runs-on: | |
| - self-hosted | |
| - ${{ inputs.environment }} | |
| - node | |
| timeout-minutes: 60 | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Run Ansible Playbook | |
| uses: dawidd6/action-ansible-playbook@v4 | |
| env: | |
| ANSIBLE_PERSISTENT_COMMAND_TIMEOUT: 10 | |
| ANSIBLE_SSH_TIMEOUT: 10 | |
| ANSIBLE_SSH_RETRIES: 5 | |
| with: | |
| requirements: galaxy-requirements.yml | |
| playbook: reset-2fa.yml | |
| directory: ./infrastructure/server-setup | |
| # Add --verbose to get more output | |
| options: |- | |
| --inventory inventory/${{ inputs.environment }}.yml | |
| --extra-vars user=${{ inputs.user }} |