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/21 21:33] val [ansible-pull] |
сервис_ansible [2023/06/24 19:36] val [Пример 3] |
||
---|---|---|---|
Line 239: | Line 239: | ||
- 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 664: | Line 664: | ||
<code> | <code> | ||
client3:~# ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git | client3:~# ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git | ||
- | </code> | + | </code><code> |
- | <code> | + | |
client1:~/ansible-pull-gpo# cat start.sh | client1:~/ansible-pull-gpo# cat start.sh | ||
+ | </code><code> | ||
#!/bin/bash | #!/bin/bash | ||
+ | |||
+ | apt update | ||
+ | apt install -y git ansible | ||
+ | |||
echo -e "0 */2 * * * \ | echo -e "0 */2 * * * \ | ||
- | /usr/bin/ansible-pull -s 120 -U http://gate.corp13.un/user1/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/user1/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> | ||