1,760
edits
Changes
→Sample outputs from running your Fabric task file
== Sample outputs from running your Fabric task file ==
Name of fabric file: a2s_rchan.py
=== list of fabric commands ===
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f a2s_rchan.py -l
Available commands:
addUser add a user with given user name to remote system
findUser find user with a given user name
listSysUser return a list of system (non-shell) user
listUser return a list of shell user on a remote system
</pre>
=== Test run the addUser task ===
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f faba2.py --host=myvmlab.senecacollege.ca --port=7598 addUser:ops435
[myvmlab.senecacollege.ca] Executing task 'addUser'
[myvmlab.senecacollege.ca] ...
Done.
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>
=== Test run the findUser task ===
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f faba2.py --host=myvmlab.senecacollege.ca --port=7598 findUser:ops435
[myvmlab.senecacollege.ca] Executing task 'findUser'
...
...
[myvmlab.senecacollege.ca] out:
Found user ops435 on the system.
Done.
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>
Another test run:
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f faba2.py --host=myvmlab.senecacollege.ca --port=7598 findUser:seneca
[myvmlab.senecacollege.ca] Executing task 'findUser'
...
...
[myvmlab.senecacollege.ca] out:
User seneca is not on the system.
Done.
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>
=== Test run the listUser task ===
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f faba2.py --host=myvmlab.senecacollege.ca --port=7598 listUser
[myvmlab.senecacollege.ca] Executing task 'listUser'
...
...
['root', 'raymond', 'chan', 'ops435']
Done.
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>
=== Test run the listSysUser task ===
<pre>
[raymond.chan@mtrx-node05pd lab8]$ fab -f faba2.py --host=myvmlab.senecacollege.ca --port=7598 listSysUser
[myvmlab.senecacollege.ca] Executing task 'listSysUser'
...
...
[myvmlab.senecacollege.ca] out:
['bin', 'daemon', ... 'postfix', 'chrony', 'ntp']
Done.
Disconnecting from myvmlab.senecacollege.ca:7598... done.
</pre>