fix: use new action for ansible run
This commit is contained in:
@@ -77,15 +77,15 @@ jobs:
|
|||||||
apt update -y
|
apt update -y
|
||||||
apt install python3-pip -y
|
apt install python3-pip -y
|
||||||
python3 -m pip install ansible
|
python3 -m pip install ansible
|
||||||
python3 -m pip install ansible-lint
|
|
||||||
|
|
||||||
- name: Install Ansible Roles
|
- name: Run playbook
|
||||||
run: |
|
uses: dawidd6/action-ansible-playbook@v2
|
||||||
ansible-galaxy install -r ../ansible/requirements.yml
|
with:
|
||||||
|
# Required, playbook filepath
|
||||||
- name: Run Ansible Playbook
|
playbook: ../ansible/main.yml
|
||||||
env:
|
# Optional, directory where playbooks live
|
||||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
directory: ../ansible/
|
||||||
ANSIBLE_HOST_KEY_CHECKING: False
|
# Optional, galaxy requirements filepath
|
||||||
run: |
|
# requirements: requirements.yaml
|
||||||
ansible-playbook -i ../ansible/inventory.ini ../ansible/main.yml
|
options: |
|
||||||
|
--inventory ../ansible/inventory.ini
|
||||||
|
@@ -10,15 +10,15 @@
|
|||||||
# pip_install_packages:
|
# pip_install_packages:
|
||||||
# - name: six
|
# - name: six
|
||||||
|
|
||||||
pre_tasks:
|
# pre_tasks:
|
||||||
- name: Ensure python3 and pip are available
|
# - name: Ensure python3 and pip are available
|
||||||
ansible.builtin.raw: |
|
# ansible.builtin.raw: |
|
||||||
sudo apt update && sudo apt install -y python3 python3-pip python3-six
|
# sudo apt update && sudo apt install -y python3 python3-pip python3-six
|
||||||
changed_when: false
|
# changed_when: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Manually gather facts after 'six' is installed
|
# - name: Manually gather facts after 'six' is installed
|
||||||
ansible.builtin.setup:
|
# ansible.builtin.setup:
|
||||||
|
|
||||||
- name: Delete existing hello world container
|
- name: Delete existing hello world container
|
||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
|
Reference in New Issue
Block a user