This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_ansible [2023/03/20 10:49] val [ansible-pull] |
сервис_ansible [2023/06/24 19:38] val [Пример 3] |
||
---|---|---|---|
Line 231: | Line 231: | ||
- hosts: sws | - hosts: sws | ||
connection: local | connection: local | ||
+ | gather_facts: no | ||
tasks: | tasks: | ||
- name: configure top level configuration | - name: configure top level configuration | ||
Line 239: | Line 240: | ||
- ip host server 192.168.X.10 | - ip host server 192.168.X.10 | ||
- | - snmp-server host server writetrap | + | # - snmp-server host server writetrap |
# - snmp-server enable traps config | # - snmp-server enable traps config | ||
Line 629: | Line 630: | ||
* [[https://medium.com/splunkuserdeveloperadministrator/using-ansible-pull-in-ansible-projects-ac04466643e8|Using Ansible Pull In Ansible Projects]] | * [[https://medium.com/splunkuserdeveloperadministrator/using-ansible-pull-in-ansible-projects-ac04466643e8|Using Ansible Pull In Ansible Projects]] | ||
* [[Инсталяция системы в конфигурации Desktop]] | * [[Инсталяция системы в конфигурации Desktop]] | ||
+ | * [[Переменные окружения]] | ||
=== Вариант 1 === | === Вариант 1 === | ||
Line 659: | Line 661: | ||
</code> | </code> | ||
- | * [[Сервис Git]] | + | * [[Инструмент GitLab]] (Создать публичный проект без readme и скопировать подсказки) |
- | * [[Инструмент GitLab]] | + | |
- | * [[Инструмент Gitea]] | + | |
<code> | <code> | ||
- | client2:~/ansible-pull-gpo# cat start.sh | + | client3:~# ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git |
</code><code> | </code><code> | ||
+ | client1:~/ansible-pull-gpo# cat start.sh | ||
+ | </code><code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | apt update | ||
+ | apt install -y git ansible | ||
+ | |||
echo -e "0 */2 * * * \ | echo -e "0 */2 * * * \ | ||
- | /usr/bin/ansible-pull -s 90 -U http://gate.corp13.un:3000/student/ansible-pull-gpo.git\n\ | + | /usr/bin/ansible-pull -s 120 -U http://gate.corp13.un/user1/ansible-pull-gpo.git -C $BR 2>&1 | /usr/bin/logger -t ansible-pull\n\ |
- | @reboot sleep 1m; /usr/bin/ansible-pull -U http://gate.corp13.un:3000/student/ansible-pull-gpo.git" | crontab - | + | @reboot sleep 1m; /usr/bin/ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git -C $BR 2>&1 | /usr/bin/logger -t ansible-pull" | crontab - |
</code> | </code> | ||
+ | |||
+ | * Инструмент GitLab [[Инструмент GitLab#Подключение через API]] | ||
=== Вариант 2 === | === Вариант 2 === |