summaryrefslogtreecommitdiff
path: root/buffer/Updates ansible ad-hoc.md
blob: 2b8514c8267554d9ce0d6fa80b2ef4ebabd0b107 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
update apt cache:
```
ansible <pattern> -m ansible.builtin.apt -a "update_cache=true cache_valid_time=3600"
```

update packages:
```
ansible <pattern> -m ansible.builtin.apt -a "name=* state=latest"
```

run puppet:
```
ansible <pattern> -a "/opt/puppetlabs/bin/puppet agent --test"
```

reboot:
```
ansible <pattern> -m ansible.builtin.reboot -f 1
```