- Generate a ssh key in the host (with the ansible server)
assniang@ASS-NIANG: ssh-keygen
- Copy the ssh key after printing it on the terminal
assniang@ASS-NIANG: cat ~/.ssh/id_rsa
- Create new credential in awx ui
- Credential Type = Source Control
- Paste the ssh-key in the SCM Private Key field
- Create a new ssh-key in github
assniang@ASS-NIANG: cat ~/.ssh/id_rsa.pub
- Copy the ssh-key
- Go to settings/SSH and GPG keys in github
- Create a new ssh-key.
- Key type : Authentication key
- Paste the ssh-key
- Source Control Type : Git
- Paste the ssh-url of the project
- Add the credential you've just created
- Check Update Revision on Lauch
- Wait for synchronization
- Go to add inventory, give a name and save it.
- In the inventory you've just created, go to souces and add a new source.
- Source = Sourced from a Project.
- Choose the project .
- Inventory file = /(project root)
- You can modify the verbosity.
- Check update on launch and save.
- Synchronized the project and the sources
- Go to add template and create a job.
Add a requirements.yml file to include the collections.
collections:
- name: fortinet.fortios
- Update the
firewall-policy-playbook.yml
file to set some firewall policies using ansible